On 9/27/07, jawarumnur <[EMAIL PROTECTED]> wrote:
> thanks, I'll try that, if the relation option "foreign_keys" didn't do
> it.

I think you don't need foreign_keys. The docs for foreign_keys states
that it should be used in conjuction with primaryjoin only if SA can
not guess the FK from the join condition alone. In this case we're
only joining on defined ForeignKey(..) fields so SA should have no
problem figuring it out.

> I'd like to get "normal" properties with "normal" getter and setter or
> append methods. I use sqlalchemy because I don't want to write all
> these methods by myself ;)

What do you mean "normal"? You have normal getters and setters for the
properties father and mother. If you want a magic property for
"children" that you can, say, append stuff to - I don't think SA will
help you much since the relationship to the child depends strictly on
if you are to be it's father or mother (which depends on the parent's
gender). SA doesn't do that kind of logic.

Besides, it's quite simple to do by hand. If you want a proper
collection for "children" that you can append to, a small helper class
will solve that issue.

Arnar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to