Do you really need one instance of the attribute? If so I suggest
unowned, and use transactions to avoid duplicates. Read this artical:
http://code.google.com/appengine/docs/java/datastore/transactions.html
If performance is not a concern, use a one-many
http://code.google.com/appengine/docs/java/datastore/relationships.html

If you do not care about one instance of the attrbite, use a
collection. This will also perform better as you only load one entity.
http://code.google.com/appengine/docs/java/datastore/dataclasses.html#Collections





On Aug 26, 12:23 pm, mar_novice <[email protected]> wrote:
> Situation..
> I have two class, Car and Attribute
> A car can have zero or more attributes and Cars can have the same
> attribute.
>
> Now for example
>  I created an instance of a car names X and has an attribute of Big.
> ------------------                   ---------------------------------
> |  Car          |                  |           Attribute          |
> -----------------                   ----------------------------------
> |       X        |                  |             Big               |
> |                 |                  |
> |
>
> now what if I created another instance of a car named Y and it has
> also an attribute of Big and Fast..
>
> ------------------                   ---------------------------------
> |  Car          |                  |           Attribute          |
> -----------------                   ----------------------------------
> |       X        |                  |             Big               |
> |      Y        |                  |              Big              |
> |                |                  |              Fast             |
>
> What is the proper approach so that the Big instance of attribute will
> not be duplicated? And should I use one to many relationship? Also it
> is owned or unowned?
>
> Thanks in advance for helping out..
>
> -mar_novice
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" 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-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to