You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Brad Threatt <br...@alumni.caltech.edu> on 2001/04/02 02:35:41 UTC

standard way to extend classes?

What's the standard way to extend a class that extends BaseObject in 
Turbine?  For example, I want to extend TurbineUser to add more fields.  
These other fields would be stored in another table, but I'd still have 
the TURBINE_USER fields from the base class.  They're linked by a 
foreign-key.  I don't have a problem with that part.

However, the Criteria would cover multiple tables, and BasePeer doInsert(), 
etc appear to only deal with one table in a Criteria.

I tried changing the Base* and Base*Peer to extend the base class versions
of these, and I also tried several variations.  For example, adding the 
base class using its peer, getting the primary key, setting it, and adding
the derived class fails, because BasePeer is doing some sort of bookkeeping
elsewhere.

Scarab seems to punt on "doing it the right way" in ScarabUser.  Is there
a right way?  The FAQ doesn't hold any answers, and Turbine itself doesn't
seem to use this anywhere.  For example, Group extends SecurityObject, but
there's no SecurityObjectPeer, because generic SecurityObjects aren't
stored in the database.

Also, if this question is more appropriate for the developers list, please 
let me know.

Thanks,
-Brad Threatt

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org