Hi,
I know how to do this in a RDBMS. If i were using a OR mapping
framework like hibernate i would have followed your apporach. However
in GAE we are not doing OR mapping at all. In java class annotations
we are not at all talking about Tables/columns etc etc. is n't it? We
just know about the objects/properties and relationship. In the
example we just know 2 objects User and Tour. I do not think we should
create a third object called Tour_User_Link and take care of
persistance/relationship management and querying ourselves.
Do you agree? or Am i missing something?

regards,
Siddharth




On Jan 19, 2:06 pm, OvermindDL1 <[email protected]> wrote:
> On Tue, Jan 19, 2010 at 1:32 AM, Siddharth Patnaik <[email protected]> 
> wrote:
> > Hi,
> > Can you be little more elaborative?
> > Do you mean that i should create another entity to store the
> > relationship details from Tour-User and User-Tour?
>
> Just as you might do it with SQL actually, here, some pseudo-code:
>
> Table Tour; // definition snipped
> Table User; // definition snipped
>
> Table Tour_User_Link
> {
>     int tour_id; // indexed
>     int user_id; // indexed
>
> }
>
> And anytime you create a many-to-many link you just create a new row
> in Tour_User_Link with the id's set to the appropriate table id's.
> Nothing special about it, this is how many-to-many is implemented in
> any database system that I have ever seen so far...  How else could
> you do it.  What were you trying to do?
-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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/google-appengine?hl=en.


Reply via email to