On 12/4/05, Michael Bayer <[EMAIL PROTECTED]> wrote:
In which case that the autogened property gets overwritten, table A that is back-referencing table B is still backreferencing table B implicitly or no?
I think the real purpose of the "backreference" is to make table A aware of the reference to B, in which case when an instance of A gets added to a B, A also knows that association. The auto added property on table A pointing to B is really secondary.
1. So it may even make sense to by default make a many-to-many relationship "two-way referencable". And have the user explicitly add the property on table A if user needs to. But then, this way a many-to-many relationship is always "two-way referencable", which I don't know is the best....
2. do something that robert suggested, explicitly specify a two way relationship, or a one way. In which case, the user should still explicitly add that property for table A if needed. In this case, user can possibly have a situation for which the objectstore state doesn't always match that of database.
On Dec 4, 2005, at 9:49 PM, Shuo Yang wrote:
> Question is if this backreference automatically adds a property to
> the other table, how do you specify different parameters to that
> relationship? Or is it not hard?
>
I had in mind that if you then just said "add_property" like we're
doing now with circular relationships, it would overwrite the auto-
created one.
In which case that the autogened property gets overwritten, table A that is back-referencing table B is still backreferencing table B implicitly or no?
I think the real purpose of the "backreference" is to make table A aware of the reference to B, in which case when an instance of A gets added to a B, A also knows that association. The auto added property on table A pointing to B is really secondary.
1. So it may even make sense to by default make a many-to-many relationship "two-way referencable". And have the user explicitly add the property on table A if user needs to. But then, this way a many-to-many relationship is always "two-way referencable", which I don't know is the best....
2. do something that robert suggested, explicitly specify a two way relationship, or a one way. In which case, the user should still explicitly add that property for table A if needed. In this case, user can possibly have a situation for which the objectstore state doesn't always match that of database.
--
---------------------------------------------------------------------------------------------------
John S. Yang

