Hi: I have the following classes and would like to create a left join so that I can sort by the plant 'name' field
class Requisition(SQLObject): class sqlmeta: style = Style(longID=True) idName = 'requisitionId' plant = ForeignKey('Plant', dbName='plantId') requisitionPeriod = ForeignKey('RequisitionPeriod', dbName='requisitionPeriodId') itemNumber = UnicodeCol(length=15) itemName = UnicodeCol(length=50) requestedBy = ForeignKey('User', dbName='requestedById') dateRequested = DateCol() quantity = IntCol() uom = UnicodeCol(length=20) quantityReceived = IntCol() dateReceived = DateCol() dateCanHold = DateCol() dateNeeded = DateCol() class Plant(SQLObject): class sqlmeta: style = Style(longID=True) idName = 'plantId' plantNumber = IntCol() name = UnicodeCol(length=50, alternateID=True) def __str__(self): return '%s' % (self.name) I've read a bunch of the docs on the LEFT JOIN stuff, but can't seem to figure out how this should work. I also read where it said that a left join should rarely be necessary if you do things with proper object techniques. Is there another way I should be looking at this? What I'm trying to do is get a list of requisitions sorted by plant name. -Jim ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss