I believe your description is accurate. I've also noticed that CREATED and MODIFIED dont get updated. I guess its a bug in turbine/torque. Haven't had the time to investigate it. > -----Original Message----- > From: Dave Carlson [mailto:dcarlson@ontogenics.com] > Sent: Friday, August 03, 2001 10:49 AM > To: jetspeed-dev@jakarta.apache.org > Subject: testing the User object values > > > As a way to understand the template mechanism in Jetspeed, > and the database > persistence provided by Turbine, I created a simple test JSP > template that > others may find helpful. > > The database tables include on OBJECTDATA field, whose > content was a mystery > to me. After reviewing Turbine code, I understood that any > attribute/value > pairs could be assigned to a User and if the attribute did > not match an column > name in the database table schema, then it was serialized > into a Hashtable in > OBJECTDATA. But I still did not know *what* was in that blob value. > > The following simple JSP page dumps all attributes of a User > retrieved from > the database, regardless of whether they are from the table columns or > deserialized from the OBJECTDATA. (This is not recommended > coding style for > production JSP!!! Just a quick hack that is easy to modify > and test without > recompiling a servlet and restarting tomcat.) > > Two attributes are extracted from the blob: _access_counter > and LAST_LOGIN. > Now, LAST_LOGIN should be in a User table column, but it's > not. This test > uncovered a SQL script error in all database variations included with > Jetspeed. All 6 turbine-*.sql scripts include > TURBINE_USER.LASTLOGIN, where > they should have TURBINE_USER.LAST_LOGIN. I checked the > turbine tdk 2.1, and > the sql scripts contained there are correct. > > If you modify this column name in the database, then > subsequent accesses to > Jetspeed will correctly populate the LAST_LOGIN column, which > can be viewed > via a simple DB select. > > I still have not figured out why the CREATED and MODIFIED > columns are not > populated in the database... > > Hope this is helpful, > Dave Carlson > > Browser URL: http://192.168.1.5/jetspeed/portal/template/TestAccount.jsp (obviously, replace your own host:port) Results: -------------------------------- User persistent data LOGIN_NAME admin PASSWORD_VALUE jetspeed _access_counter 7 FIRST_NAME Raphael LAST_LOGIN Fri Aug 03 09:23:34 MDT 2001 CONFIRM_VALUE CONFIRMED LAST_NAME Admin EMAIL raphael@apache.org ------------------------------ Save this JSP to: /WEB-INF/templates/jsp/screens/html/TestAccount.jsp ------------------------- <%@ taglib uri='/WEB-INF/templates/jsp/tld/template.tld' prefix='jetspeed' %> <%@ page import = "org.apache.turbine.util.RunData" %> <%@ page import = "org.apache.turbine.om.security.User" %>
<%=name%> | <%=value%> |