First off, let me say I feel RelatedJoin and MultipleJoin should be deprecated
to be renamed RawRelatedJoin/RawMultipleJoin, there are two better alternatives
available since at least 0.8:
 * SQLRelatedJoin and SQLMultipleJoin
 * ManyToMany and OneToMany


Yes, the docs need a massive overhaul on this topic - I don't believe ManyToMany
and OneToMany are mentioned at all.

These both have the advantage over the Raw versions of returning SelectResults
instances: lazy, filterable etc result sets same as is returned by .select()

They differ in how you perform the C*UD operations you're asking about, in short
ManyToMany has .add(obj), .remove(obj), .create(kw) methods under obj.joinName,
whereas SQLRelatedJoin adds methods to the class: .addJoinName(obj) and
.removeJoinName(obj). If you choose to keep using RelatedJoin, it acts like
SQLRelatedJoin in this aspect.

I've put a doctest example of these and a little more up at
http://freehg.org/u/loppear/sqlobject_play/file/5cf57a8ce206/m2m_versus_sqljoin.py

- Luke



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to