no, it will generate getUserProfiles(). and that is not Matthew's problem but rather getting only ONE profile with getUserProfile().You can add a USER_PROFILE_ID field to your EXTENDED_USER table and make it a foreign key to the USER_PROFILE table. Then torque should autogenerate the getUserProfile() function i believe.
Matthew - see my answer above.... you can implement this method in ExtendedUser. That is how I do such things.
regards - michal
-Lou
--- Matthew Pomar <[EMAIL PROTECTED]> wrote:
http://jakarta.apache.org/turbine/turbine-2.2.1/howto/extend-user-howto.htmlIs there anyway to use Turbine (Torque) to create a one-to-one mapping in the database schema? I'm extending the TURBINE_USER per instructions on Turbine site:
---------------------------------------------------------------------But instead of creating over 25 new columns in the user table, I'm create a new USER_PROFILE table with all the additional information. What I'm facing now is this:
ExtendedUser user = (ExtendedUser)data.getUser(); UserProfile profile = (UserProfile)user.getUserProfiles().get(0);
There is only 1 profile for 1 user - one to one. Instead of the above code, I would like to do this:
ExtendedUser user = (ExtendedUser)data.getUser(); UserProfile profile = user.getUserProfile();
Can anyone tell me how to accomplish this without extending the ExtendedUser class?
Thanks
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
__________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
