so no other way?

On Wed, May 4, 2011 at 12:08 AM, Muhammad Ijaz Khan <aija...@gmail.com>wrote:

> This is exactly what I am doing for now but was wondering if there is a
> better way and better way of loading the actual object from key. Thanks for
> your comment as it reduced my loneliness :)
>
> On Wed, May 4, 2011 at 12:03 AM, Luca Matteis <lmatt...@gmail.com> wrote:
>
>> Owned relationships are a bit weird in my opinion. I was having your
>> same issue. I had a `MyImage` class that was defined inside two
>> different classes. This didn't work... I didn't quite understand why
>> and so to avoid all weirdness I decided that for more complex
>> relationship cases I would always use unowned relationships (defining
>> the Key of the reference object instead of the object itself).
>>
>> So I only use owned relationships when the child object can only exist
>> under 1 (and only 1) parent.
>>
>> Hope this helped... it's only what I experienced... I'm not a JDO expert.
>>
>>    Luca
>>
>> On Tue, May 3, 2011 at 10:51 PM, Muhammad Ijaz Khan <aija...@gmail.com>
>> wrote:
>> > Hi,
>> > I am building an application and have used JDO for datastore for
>> > implementing use cases. Now when I am implementing the backend machine
>> which
>> > is a bit complex in relationships among objects then I am facing hard
>> times
>> > with JDO (May be due to lack of my knowledge). I have following
>> questions to
>> > ask,
>> > 1. Can I use reference of objects in more than one classes? For example,
>> > Class A is persistent and being used as foreign key in Class B and Class
>> C.
>> > Do I need to create unowned relationships through Key or can I use some
>> > annotation (or something) to mark a field of type A as foreign key? When
>> I
>> > make a field of type A in class B, and assign an object of class A to
>> it, it
>> > is stored as new object as child of B :s
>> > 2. Can I use objectify for this use case only (mixing with jdo) and will
>> it
>> > simplify stuff or not, any experience comment?
>> > Thanks in advance.
>> > regards
>> > Ijaz
>> >
>> > --
>> > 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
>> google-appengine-java@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > google-appengine-java+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/google-appengine-java?hl=en.
>> >
>>
>> --
>> 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
>> google-appengine-java@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>>
>

-- 
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 google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to