John McNally wrote:
> Do not understand the question.  Different DataBaseMaps?  BasePeer handles
> simple joins between tables in the same db.  Since a peer is generally
> associated with a business object, which has an id given by the primary key
> which is then used as the foreign key in other tables,  BasePeer will
> perform the join if you are selecting the column referenced by a foreign key
> in the where clause.  I was planning to add other conditions as I came
> across them, but as of yet I have had no need as this case is almost always
> what I am after.  And for the few other cases I just write the sql out into
> a CUSTOM criteria, as I have not had the time to generalize them.

Hello John,

Sorry that my question was so terse.  It was my understanding that
scarab defines a db map for each table -
http://scarab.tigris.org/source/browse/scarab/src/java/org/tigris/scarab/om/mapbuilder
.  This seems a little different than what you explained, so I'm
probably just confused here. :)

> > SqlExpression.buildInnerJoin?
> 
> This is what is used by BasePeer to do the join.  I'm not sure how to use it
> outside BasePeer in conjunction with BasePeer.
> 

Ok, never mind, I thought you'd just subclass BasePeer.doSelect() and
createQueryString() .

Thanks for the info,
~Eric


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to