On Feb 22, 5:40 pm, Alexandre da Silva <[EMAIL PROTECTED]> wrote:
> > No, there isn't such option currently. But I don't think it would make
> > sense to add one (at least for this particular case) because a O2M
> > relationship cannot exist without its corresponding M2O (because the
> > column containing the FK is created by the M2O).
>
> exactly, by removing the column isn't an options because the column is needed
> to relation work. but I already think that Elixir don't need to create
> this automatic backref on "Person". maybe to avoid this behavior,
> instead of create the backref on "Person" to supply the "person" column
> on Goal, it should create the relation person on Goal. and the "result
> mapper" would be:
>
> mapper(Goal, goal_table,
> properties=dict(
> person=relation(Person, uselist=False)
> )
> )
> mapper(Person, person_table,
> properties=dict(
> goals=relation(Goal)
> )
> )
>
that relation from "Goal" to "person" is still not really correct; it
will return a Person object when what you really want is a
Representative. why do you need the half-broken Goal->person
relation ? if its just for writing and not reading, why can you just
set the enable_typechecks=False flag ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---