On Tue, Feb 26, 2008 at 01:33:41PM +0100, Diez B. Roggisch wrote:
> class A(SQLObject):
> bs = MultipleJoin("B")
>
> class B(SQLObject):
> an_a = ForeignKey("A")
>
> I'd like the idea of this becoming a bit more magic, and in case of ambiguity
> at least more in the Python-world than in the DB-world.
>
> What do i mean? Well, if there is only one 1:n-relation A<-B, then I think we
> could safely assume that to be the one multiply joined, and thus query B for
> the column-name to use.
+1
> If there a several, ambiguity rises it's ugly head - then I'd suggest the
> following notation which abstracts from the id-column-stuff:
>
> class A(...)
> bs = MultipleJoin("B", opposite="an_a")
+1
> As always, I'd be implementing and testing things of course.
+1 :)
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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss