> Leon Messerschmidt wrote:
> >
> > Hi,
> >
> > Current in TurbineUserPeer there is code that prevents the USER_ID to be
> > added to the Permanent storage
> >
> > if ( ! ( columnNames[j].equalsIgnoreCase( USER_ID_COLUMN )
> >   ||  columnNames[j].equalsIgnoreCase( OBJECT_DATA_COLUMN ) ))
> >     {
> >         // Add to storage
> >     }
> >
> > Would it be ok to remove the USER_ID_COLUMN restriction so that I can
get a
> > hold of the USER_ID with
> >
> > id = data.getUser().getPerm("USER_ID");
> >
> > Or is there some reason that I don't see for USER_ID to be excluded from
the
> > permanentStorage?
> >
>
> I am not sure that it won't cause a problem, I guess you will have to
> test.  But I do not really like putting the value in two places, why
> don't you want to call the getPrimaryKey method?  Are you trying to
> avoid a cast?
>
> John McNally

Trying to avoid a cast.  I'm going to use the id anyway for relations, it is
just a question of how I'm getting it.  The first line looks better that the
last though:

id = User.getPerm("USER_ID")
id = ((TurbineUser)User).getPrimaryKey()

Also other (hypothetical :-) backends might also support getPerm("USER_ID"),
in which case the first line will work and the last not.

~ Leon



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to