On Tue, Apr 22, 2008 at 04:37:34PM -0700, Fred C wrote: > On Apr 22, 2008, at 4:21 PM, Oleg Broytmann wrote: > > On Tue, Apr 22, 2008 at 04:16:53PM -0700, Fred C wrote: > >> How > >> can I have sqlobject returning the fields from both tables. > > > > SQLObject.select() cannot do that because it doesn't know the > > description of the fields. Article.select(...) - SQLObject knows only > > Article's fields. > > sqlbuilder.Select() returns whatever you want. > > The problem with sqlbuilder is that it only know about the database > raw fields and what is returned are just arrays of fields and I am > loosing the mapping with the objects.
Table.select() operates with the Table and only with the Table. All other objects are SQLExpressions, not tables, so SQLObject cannot guess if they are tables and what SQLObjects these tables correspond to. SQLObject converts these SQLExpressions to strings and construct SQL queries, but that's all it can do. http://sqlobject.org/FAQ.html#how-can-i-do-a-left-join Oleg. -- Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss