On 09/03/2011 15:03, Ed Leafe wrote:
> On Mar 9, 2011, at 8:48 AM, Werner F. Bruhin wrote:
>
>> I note that all the "hours" columns are prefixed with
>> "hours.columnname", is this needed as soon as one has an addJoin in there?
>       No, no necessary; the default alias is the DataSource, but when there 
> are two aliases in play, I prefer the explicit naming.
>
>> Would be nice if addChild could take care of this and provide all the
>> columns of the child.
>       That would be unwieldy, to say the least. It would force an additional 
> requery for each child bizobj whenever the parent record changed. With a 
> join, the lookup data is gotten in the initial query, and no subsequent 
> queries need to be run.
>
I guess what I was looking for is the equivalent of "relationship" in 
SQLAlchemy.

http://www.sqlalchemy.org/docs/orm/tutorial.html?highlight=relationship#creating-table-class-and-mapper-all-at-once-declaratively)
http://www.sqlalchemy.org/docs/orm/relationships.html#sqlalchemy.orm.relationship

By default SA does a "lazy" load of all these relationships, but there 
are other options.

So, maybe a:

bizobj.addRelation(fkcolumn, table) and it would do the addChild, the 
join an and whatever else is needed

Werner

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to