[appengine-java] Re: Entity relations (JPA vs lowlevel API)

2010-11-20 Thread Roberto Saccon
maybe a good place to start is sourcecode of lowlevel-based frameworks
like slim3 or objectify
--
Roberto

On Nov 20, 8:13 am, Tom  wrote:
> Hi there,
>
> I'm searching for information of entity relation ships in appengine.
> JPA for example supports relations between entites (one-to-one,
> ont-to-many, many-to-many). As far as I know by know the underlying
> datastore doesn't direktly support this and not join queries (different
> entities).
>
> How do you store Customer -> Orders in the datastore? Is there low
> level API example code?
> Would I store an entity "Customer" with attributes and a list of order
> ids?
>
> Any help highly appreciated.
> Thanks
> Tom

-- 
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-j...@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.



[appengine-java] Re: Entity relations (JPA vs lowlevel API)

2010-11-20 Thread Didier Durand
Hi,

I would recommend Objectify (which I use heavily): seems to match your
need.

regards
didier

On Nov 20, 1:20 pm, Roberto Saccon  wrote:
> maybe a good place to start is sourcecode of lowlevel-based frameworks
> like slim3 or objectify
> --
> Roberto
>
> On Nov 20, 8:13 am, Tom  wrote:
>
> > Hi there,
>
> > I'm searching for information of entity relation ships in appengine.
> > JPA for example supports relations between entites (one-to-one,
> > ont-to-many, many-to-many). As far as I know by know the underlying
> > datastore doesn't direktly support this and not join queries (different
> > entities).
>
> > How do you store Customer -> Orders in the datastore? Is there low
> > level API example code?
> > Would I store an entity "Customer" with attributes and a list of order
> > ids?
>
> > Any help highly appreciated.
> > Thanks
> > Tom
>
>

-- 
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-j...@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.



[appengine-java] Re: Entity relations (JPA vs lowlevel API)

2010-11-22 Thread vaninh0
Hi Didier,

with Objectify is possible to create a Entity with two distinct
childrens?

example:

class A {
@Id Long Id;
}
class B {
@Id Long Id;
}
class C {
@Id Long Id;
@Parent Key a;
@Parent Key b;
}

regards,
vanio.

On 20 nov, 14:41, Didier Durand  wrote:
> Hi,
>
> I would recommend Objectify (which I use heavily): seems to match your
> need.
>
> regards
> didier
>
> On Nov 20, 1:20 pm, Roberto Saccon  wrote:
>
> > maybe a good place to start is sourcecode of lowlevel-based frameworks
> > like slim3 or objectify
> > --
> > Roberto
>
> > On Nov 20, 8:13 am, Tom  wrote:
>
> > > Hi there,
>
> > > I'm searching for information of entity relation ships in appengine.
> > > JPA for example supports relations between entites (one-to-one,
> > > ont-to-many, many-to-many). As far as I know by know the underlying
> > > datastore doesn't direktly support this and not join queries (different
> > > entities).
>
> > > How do you store Customer -> Orders in the datastore? Is there low
> > > level API example code?
> > > Would I store an entity "Customer" with attributes and a list of order
> > > ids?
>
> > > Any help highly appreciated.
> > > Thanks
> > > Tom
>
>

-- 
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-j...@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.



[appengine-java] Re: Entity relations (JPA vs lowlevel API)

2010-11-22 Thread vaninh0
*actually, two parents.

On 22 nov, 15:22, vaninh0  wrote:
> Hi Didier,
>
> with Objectify is possible to create a Entity with two distinct
> childrens?
>
> example:
>
> class A {
> @Id Long Id;}
>
> class B {
> @Id Long Id;}
>
> class C {
> @Id Long Id;
> @Parent Key a;
> @Parent Key b;
>
> }
>
> regards,
> vanio.
>
> On 20 nov, 14:41, Didier Durand  wrote:
>
> > Hi,
>
> > I would recommend Objectify (which I use heavily): seems to match your
> > need.
>
> > regards
> > didier
>
> > On Nov 20, 1:20 pm, Roberto Saccon  wrote:
>
> > > maybe a good place to start is sourcecode of lowlevel-based frameworks
> > > like slim3 or objectify
> > > --
> > > Roberto
>
> > > On Nov 20, 8:13 am, Tom  wrote:
>
> > > > Hi there,
>
> > > > I'm searching for information of entity relation ships in appengine.
> > > > JPA for example supports relations between entites (one-to-one,
> > > > ont-to-many, many-to-many). As far as I know by know the underlying
> > > > datastore doesn't direktly support this and not join queries (different
> > > > entities).
>
> > > > How do you store Customer -> Orders in the datastore? Is there low
> > > > level API example code?
> > > > Would I store an entity "Customer" with attributes and a list of order
> > > > ids?
>
> > > > Any help highly appreciated.
> > > > Thanks
> > > > Tom
>
>

-- 
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-j...@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.



[appengine-java] Re: Entity relations (JPA vs lowlevel API)

2010-11-22 Thread Didier Durand
Hi Vaninho,

If you want to group some A, B & C entities in the same entity group,
you have to say (for example) that A is a parent of B (via a @Parent
Key key in B) and then that B is a parent of C (via a @Parent
Key in C).

You can add @Transient if you don't want the Keys to be stored as
properties of the entity

Then you can query with ancestor() filter.

regards
didier

On Nov 22, 9:10 pm, Jeff Schnitzer  wrote:
> This doesn't make any sense; entities in the GAE datastore cannot have
> multiple *parent* keys.  However, your structure would work fine if
> you just dropped the @Parent annotation.
>
> This may help:  
> http://code.google.com/p/objectify-appengine/wiki/Concepts#Keys
>
> Jeff
>
> On Mon, Nov 22, 2010 at 10:22 AM, vaninh0  wrote:
> > Hi Didier,
>
> > with Objectify is possible to create a Entity with two distinct
> > childrens?
>
> > example:
>
> > class A {
> > @Id Long Id;
> > }
> > class B {
> > @Id Long Id;
> > }
> > class C {
> > @Id Long Id;
> > @Parent Key a;
> > @Parent Key b;
> > }
>
> > regards,
> > vanio.
>
> > On 20 nov, 14:41, Didier Durand  wrote:
> >> Hi,
>
> >> I would recommend Objectify (which I use heavily): seems to match your
> >> need.
>
> >> regards
> >> didier
>
> >> On Nov 20, 1:20 pm, Roberto Saccon  wrote:
>
> >> > maybe a good place to start is sourcecode of lowlevel-based frameworks
> >> > like slim3 or objectify
> >> > --
> >> > Roberto
>
> >> > On Nov 20, 8:13 am, Tom  wrote:
>
> >> > > Hi there,
>
> >> > > I'm searching for information of entity relation ships in appengine.
> >> > > JPA for example supports relations between entites (one-to-one,
> >> > > ont-to-many, many-to-many). As far as I know by know the underlying
> >> > > datastore doesn't direktly support this and not join queries (different
> >> > > entities).
>
> >> > > How do you store Customer -> Orders in the datastore? Is there low
> >> > > level API example code?
> >> > > Would I store an entity "Customer" with attributes and a list of order
> >> > > ids?
>
> >> > > Any help highly appreciated.
> >> > > Thanks
> >> > > Tom
>
> > --
> > 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-j...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > google-appengine-java+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://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-j...@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.



[appengine-java] Re: Entity relations (JPA vs lowlevel API)

2010-11-24 Thread vaninh0
Hi Tinker,

It´s just a suggestion, use the Objectify.
I've changed my project and the things are really better now!

On 23 nov, 03:15, Tinker Pang  wrote:
> Hi didier
>
> I have the same question, too
>
> When I creat the parent Key
>
> How can I get the parent via Key?
>
> I tested many times and many ways, I can't get the parent,
>
> And why use Key to build entity relation? Could I use other type? for
> example int long string?
>
> Best Regards
> Tinker
>
> 2010/11/23 Didier Durand 
>
> > Hi Vaninho,
>
> > If you want to group some A, B & C entities in the same entity group,
> > you have to say (for example) that A is a parent of B (via a @Parent
> > Key key in B) and then that B is a parent of C (via a @Parent
> > Key in C).
>
> > You can add @Transient if you don't want the Keys to be stored as
> > properties of the entity
>
> > Then you can query with ancestor() filter.
>
> > regards
> > didier
>
> > On Nov 22, 9:10 pm, Jeff Schnitzer  wrote:
> > > This doesn't make any sense; entities in the GAE datastore cannot have
> > > multiple *parent* keys.  However, your structure would work fine if
> > > you just dropped the @Parent annotation.
>
> > > This may help:
> >http://code.google.com/p/objectify-appengine/wiki/Concepts#Keys
>
> > > Jeff
>
> > > On Mon, Nov 22, 2010 at 10:22 AM, vaninh0  wrote:
> > > > Hi Didier,
>
> > > > with Objectify is possible to create a Entity with two distinct
> > > > childrens?
>
> > > > example:
>
> > > > class A {
> > > > @Id Long Id;
> > > > }
> > > > class B {
> > > > @Id Long Id;
> > > > }
> > > > class C {
> > > > @Id Long Id;
> > > > @Parent Key a;
> > > > @Parent Key b;
> > > > }
>
> > > > regards,
> > > > vanio.
>
> > > > On 20 nov, 14:41, Didier Durand  wrote:
> > > >> Hi,
>
> > > >> I would recommend Objectify (which I use heavily): seems to match your
> > > >> need.
>
> > > >> regards
> > > >> didier
>
> > > >> On Nov 20, 1:20 pm, Roberto Saccon  wrote:
>
> > > >> > maybe a good place to start is sourcecode of lowlevel-based
> > frameworks
> > > >> > like slim3 or objectify
> > > >> > --
> > > >> > Roberto
>
> > > >> > On Nov 20, 8:13 am, Tom  wrote:
>
> > > >> > > Hi there,
>
> > > >> > > I'm searching for information of entity relation ships in
> > appengine.
> > > >> > > JPA for example supports relations between entites (one-to-one,
> > > >> > > ont-to-many, many-to-many). As far as I know by know the
> > underlying
> > > >> > > datastore doesn't direktly support this and not join queries
> > (different
> > > >> > > entities).
>
> > > >> > > How do you store Customer -> Orders in the datastore? Is there low
> > > >> > > level API example code?
> > > >> > > Would I store an entity "Customer" with attributes and a list of
> > order
> > > >> > > ids?
>
> > > >> > > Any help highly appreciated.
> > > >> > > Thanks
> > > >> > > Tom
>
> > > > --
> > > > 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-j...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com
> > .
> > > > For more options, visit this group athttp://
> > 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-j...@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-j...@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.



[appengine-java] Re: Entity relations (JPA vs lowlevel API)

2010-11-24 Thread Didier Durand
@Tinker

Objectify is a framework used to replace JDO or JPA: it works at an
intermediate level of abstraction between the low-level datastore api
and the high-level of JDO-JPA.

I use it heavily (with high satisfaction): it is very stable and
efficient to access the data.

It is much simpler to apprehend than JDO and well supported in its own
support group.

If you feel overwhelmed by JDO/JPA or if you feel that JDO/JPA
mechanisms are too opaque, give it a try!

regards
didier

On Nov 24, 1:31 pm, Liang Ding  wrote:
> Hi, Tinker Pang, I am a Chinese 2.
>
> 你可以看看这个:http://code.google.com/p/twig-persist/,是个类似 Objectify 的持久层框架。
> 还有一个简易 GAE 框架:http://code.google.com/p/latke/
>
>
>
> On Wed, Nov 24, 2010 at 8:00 PM, Tinker Pang  wrote:
> > Hi Vaninho
>
> > What is "Objectify"?
>
> > I am a Chinese, and I  search "Objectify" by google , I can't search
> > Chinese material.
> > The Chinese material about "Objectify" is very few.
> > And the English material, I read it, and still can't understand it.
>
> > Could you tell me the simple explanation about "Objectify"?
> > Thanks for your reply.
>
> > Best Regards
> > Tinker
>
> > 2010/11/24 vaninh0 
>
> > Hi Tinker,
>
> >> It´s just a suggestion, use the Objectify.
> >> I've changed my project and the things are really better now!
>
> >> On 23 nov, 03:15, Tinker Pang  wrote:
> >> > Hi didier
>
> >> > I have the same question, too
>
> >> > When I creat the parent Key
>
> >> > How can I get the parent via Key?
>
> >> > I tested many times and many ways, I can't get the parent,
>
> >> > And why use Key to build entity relation? Could I use other type? for
> >> > example int long string?
>
> >> > Best Regards
> >> > Tinker
>
> >> > 2010/11/23 Didier Durand 
>
> >> > > Hi Vaninho,
>
> >> > > If you want to group some A, B & C entities in the same entity group,
> >> > > you have to say (for example) that A is a parent of B (via a @Parent
> >> > > Key key in B) and then that B is a parent of C (via a @Parent
> >> > > Key in C).
>
> >> > > You can add @Transient if you don't want the Keys to be stored as
> >> > > properties of the entity
>
> >> > > Then you can query with ancestor() filter.
>
> >> > > regards
> >> > > didier
>
> >> > > On Nov 22, 9:10 pm, Jeff Schnitzer  wrote:
> >> > > > This doesn't make any sense; entities in the GAE datastore cannot
> >> have
> >> > > > multiple *parent* keys.  However, your structure would work fine if
> >> > > > you just dropped the @Parent annotation.
>
> >> > > > This may help:
> >> > >http://code.google.com/p/objectify-appengine/wiki/Concepts#Keys
>
> >> > > > Jeff
>
> >> > > > On Mon, Nov 22, 2010 at 10:22 AM, vaninh0 
> >> wrote:
> >> > > > > Hi Didier,
>
> >> > > > > with Objectify is possible to create a Entity with two distinct
> >> > > > > childrens?
>
> >> > > > > example:
>
> >> > > > > class A {
> >> > > > > @Id Long Id;
> >> > > > > }
> >> > > > > class B {
> >> > > > > @Id Long Id;
> >> > > > > }
> >> > > > > class C {
> >> > > > > @Id Long Id;
> >> > > > > @Parent Key a;
> >> > > > > @Parent Key b;
> >> > > > > }
>
> >> > > > > regards,
> >> > > > > vanio.
>
> >> > > > > On 20 nov, 14:41, Didier Durand  wrote:
> >> > > > >> Hi,
>
> >> > > > >> I would recommend Objectify (which I use heavily): seems to match
> >> your
> >> > > > >> need.
>
> >> > > > >> regards
> >> > > > >> didier
>
> >> > > > >> On Nov 20, 1:20 pm, Roberto Saccon  wrote:
>
> >> > > > >> > maybe a good place to start is sourcecode of lowlevel-based
> >> > > frameworks
> >> > > > >> > like slim3 or objectify
> >> > > > >> > --
> >> > > > >> > Roberto
>
> >> > > > >> > On Nov 20, 8:13 am, Tom  wrote:
>
> >> > > > >> > > Hi there,
>
> >> > > > >> > > I'm searching for information of entity relation ships in
> >> > > appengine.
> >> > > > >> > > JPA for example supports relations between entites
> >> (one-to-one,
> >> > > > >> > > ont-to-many, many-to-many). As far as I know by know the
> >> > > underlying
> >> > > > >> > > datastore doesn't direktly support this and not join queries
> >> > > (different
> >> > > > >> > > entities).
>
> >> > > > >> > > How do you store Customer -> Orders in the datastore? Is
> >> there low
> >> > > > >> > > level API example code?
> >> > > > >> > > Would I store an entity "Customer" with attributes and a list
> >> of
> >> > > order
> >> > > > >> > > ids?
>
> >> > > > >> > > Any help highly appreciated.
> >> > > > >> > > Thanks
> >> > > > >> > > Tom
>
> >> > > > > --
> >> > > > > 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-j...@googlegroups.com.
> >> > > > > To unsubscribe from this group, send email to
> >> > > google-appengine-java+unsubscr...@googlegroups.com
> >> 
>
> >> > > .
> >> > > > > For more options, visit this group athttp://
> >> > > groups.google.com/group/google-appengine-java?hl=en.
>
> >> > > --
> >> > > You received this message because you are subscribed to

Re: [appengine-java] Re: Entity relations (JPA vs lowlevel API)

2010-11-22 Thread Jeff Schnitzer
This doesn't make any sense; entities in the GAE datastore cannot have
multiple *parent* keys.  However, your structure would work fine if
you just dropped the @Parent annotation.

This may help:  http://code.google.com/p/objectify-appengine/wiki/Concepts#Keys

Jeff

On Mon, Nov 22, 2010 at 10:22 AM, vaninh0  wrote:
> Hi Didier,
>
> with Objectify is possible to create a Entity with two distinct
> childrens?
>
> example:
>
> class A {
> @Id Long Id;
> }
> class B {
> @Id Long Id;
> }
> class C {
> @Id Long Id;
> @Parent Key a;
> @Parent Key b;
> }
>
> regards,
> vanio.
>
> On 20 nov, 14:41, Didier Durand  wrote:
>> Hi,
>>
>> I would recommend Objectify (which I use heavily): seems to match your
>> need.
>>
>> regards
>> didier
>>
>> On Nov 20, 1:20 pm, Roberto Saccon  wrote:
>>
>> > maybe a good place to start is sourcecode of lowlevel-based frameworks
>> > like slim3 or objectify
>> > --
>> > Roberto
>>
>> > On Nov 20, 8:13 am, Tom  wrote:
>>
>> > > Hi there,
>>
>> > > I'm searching for information of entity relation ships in appengine.
>> > > JPA for example supports relations between entites (one-to-one,
>> > > ont-to-many, many-to-many). As far as I know by know the underlying
>> > > datastore doesn't direktly support this and not join queries (different
>> > > entities).
>>
>> > > How do you store Customer -> Orders in the datastore? Is there low
>> > > level API example code?
>> > > Would I store an entity "Customer" with attributes and a list of order
>> > > ids?
>>
>> > > Any help highly appreciated.
>> > > Thanks
>> > > Tom
>>
>>
>
> --
> 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-j...@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-j...@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.



Re: [appengine-java] Re: Entity relations (JPA vs lowlevel API)

2010-11-23 Thread Tinker Pang
Hi didier

I have the same question, too

When I creat the parent Key

How can I get the parent via Key?

I tested many times and many ways, I can't get the parent,

And why use Key to build entity relation? Could I use other type? for
example int long string?

Best Regards
Tinker

2010/11/23 Didier Durand 

> Hi Vaninho,
>
> If you want to group some A, B & C entities in the same entity group,
> you have to say (for example) that A is a parent of B (via a @Parent
> Key key in B) and then that B is a parent of C (via a @Parent
> Key in C).
>
> You can add @Transient if you don't want the Keys to be stored as
> properties of the entity
>
> Then you can query with ancestor() filter.
>
> regards
> didier
>
> On Nov 22, 9:10 pm, Jeff Schnitzer  wrote:
> > This doesn't make any sense; entities in the GAE datastore cannot have
> > multiple *parent* keys.  However, your structure would work fine if
> > you just dropped the @Parent annotation.
> >
> > This may help:
> http://code.google.com/p/objectify-appengine/wiki/Concepts#Keys
> >
> > Jeff
> >
> > On Mon, Nov 22, 2010 at 10:22 AM, vaninh0  wrote:
> > > Hi Didier,
> >
> > > with Objectify is possible to create a Entity with two distinct
> > > childrens?
> >
> > > example:
> >
> > > class A {
> > > @Id Long Id;
> > > }
> > > class B {
> > > @Id Long Id;
> > > }
> > > class C {
> > > @Id Long Id;
> > > @Parent Key a;
> > > @Parent Key b;
> > > }
> >
> > > regards,
> > > vanio.
> >
> > > On 20 nov, 14:41, Didier Durand  wrote:
> > >> Hi,
> >
> > >> I would recommend Objectify (which I use heavily): seems to match your
> > >> need.
> >
> > >> regards
> > >> didier
> >
> > >> On Nov 20, 1:20 pm, Roberto Saccon  wrote:
> >
> > >> > maybe a good place to start is sourcecode of lowlevel-based
> frameworks
> > >> > like slim3 or objectify
> > >> > --
> > >> > Roberto
> >
> > >> > On Nov 20, 8:13 am, Tom  wrote:
> >
> > >> > > Hi there,
> >
> > >> > > I'm searching for information of entity relation ships in
> appengine.
> > >> > > JPA for example supports relations between entites (one-to-one,
> > >> > > ont-to-many, many-to-many). As far as I know by know the
> underlying
> > >> > > datastore doesn't direktly support this and not join queries
> (different
> > >> > > entities).
> >
> > >> > > How do you store Customer -> Orders in the datastore? Is there low
> > >> > > level API example code?
> > >> > > Would I store an entity "Customer" with attributes and a list of
> order
> > >> > > ids?
> >
> > >> > > Any help highly appreciated.
> > >> > > Thanks
> > >> > > Tom
> >
> > > --
> > > 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-j...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> > > For more options, visit this group athttp://
> 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-j...@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-j...@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.



Re: [appengine-java] Re: Entity relations (JPA vs lowlevel API)

2010-11-24 Thread Tinker Pang
Hi Vaninho

What is "Objectify"?

I am a Chinese, and I  search "Objectify" by google , I can't search Chinese
material.
The Chinese material about "Objectify" is very few.
And the English material, I read it, and still can't understand it.

Could you tell me the simple explanation about "Objectify"?
Thanks for your reply.

Best Regards
Tinker


2010/11/24 vaninh0 

> Hi Tinker,
>
> It´s just a suggestion, use the Objectify.
> I've changed my project and the things are really better now!
>
> On 23 nov, 03:15, Tinker Pang  wrote:
> > Hi didier
> >
> > I have the same question, too
> >
> > When I creat the parent Key
> >
> > How can I get the parent via Key?
> >
> > I tested many times and many ways, I can't get the parent,
> >
> > And why use Key to build entity relation? Could I use other type? for
> > example int long string?
> >
> > Best Regards
> > Tinker
> >
> > 2010/11/23 Didier Durand 
> >
> > > Hi Vaninho,
> >
> > > If you want to group some A, B & C entities in the same entity group,
> > > you have to say (for example) that A is a parent of B (via a @Parent
> > > Key key in B) and then that B is a parent of C (via a @Parent
> > > Key in C).
> >
> > > You can add @Transient if you don't want the Keys to be stored as
> > > properties of the entity
> >
> > > Then you can query with ancestor() filter.
> >
> > > regards
> > > didier
> >
> > > On Nov 22, 9:10 pm, Jeff Schnitzer  wrote:
> > > > This doesn't make any sense; entities in the GAE datastore cannot
> have
> > > > multiple *parent* keys.  However, your structure would work fine if
> > > > you just dropped the @Parent annotation.
> >
> > > > This may help:
> > >http://code.google.com/p/objectify-appengine/wiki/Concepts#Keys
> >
> > > > Jeff
> >
> > > > On Mon, Nov 22, 2010 at 10:22 AM, vaninh0  wrote:
> > > > > Hi Didier,
> >
> > > > > with Objectify is possible to create a Entity with two distinct
> > > > > childrens?
> >
> > > > > example:
> >
> > > > > class A {
> > > > > @Id Long Id;
> > > > > }
> > > > > class B {
> > > > > @Id Long Id;
> > > > > }
> > > > > class C {
> > > > > @Id Long Id;
> > > > > @Parent Key a;
> > > > > @Parent Key b;
> > > > > }
> >
> > > > > regards,
> > > > > vanio.
> >
> > > > > On 20 nov, 14:41, Didier Durand  wrote:
> > > > >> Hi,
> >
> > > > >> I would recommend Objectify (which I use heavily): seems to match
> your
> > > > >> need.
> >
> > > > >> regards
> > > > >> didier
> >
> > > > >> On Nov 20, 1:20 pm, Roberto Saccon  wrote:
> >
> > > > >> > maybe a good place to start is sourcecode of lowlevel-based
> > > frameworks
> > > > >> > like slim3 or objectify
> > > > >> > --
> > > > >> > Roberto
> >
> > > > >> > On Nov 20, 8:13 am, Tom  wrote:
> >
> > > > >> > > Hi there,
> >
> > > > >> > > I'm searching for information of entity relation ships in
> > > appengine.
> > > > >> > > JPA for example supports relations between entites
> (one-to-one,
> > > > >> > > ont-to-many, many-to-many). As far as I know by know the
> > > underlying
> > > > >> > > datastore doesn't direktly support this and not join queries
> > > (different
> > > > >> > > entities).
> >
> > > > >> > > How do you store Customer -> Orders in the datastore? Is there
> low
> > > > >> > > level API example code?
> > > > >> > > Would I store an entity "Customer" with attributes and a list
> of
> > > order
> > > > >> > > ids?
> >
> > > > >> > > Any help highly appreciated.
> > > > >> > > Thanks
> > > > >> > > Tom
> >
> > > > > --
> > > > > 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-j...@googlegroups.com.
> > > > > To unsubscribe from this group, send email to
> > > google-appengine-java+unsubscr...@googlegroups.com
> 
> >
> > > .
> > > > > For more options, visit this group athttp://
> > > 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-j...@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-j...@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-j...@googlegroups.com.
To unsubscribe from th

Re: [appengine-java] Re: Entity relations (JPA vs lowlevel API)

2010-11-24 Thread Liang Ding
Hi, Tinker Pang, I am a Chinese 2.

你可以看看这个:http://code.google.com/p/twig-persist/,是个类似 Objectify 的持久层框架。
还有一个简易 GAE 框架:http://code.google.com/p/latke/

On Wed, Nov 24, 2010 at 8:00 PM, Tinker Pang  wrote:

> Hi Vaninho
>
> What is "Objectify"?
>
> I am a Chinese, and I  search "Objectify" by google , I can't search
> Chinese material.
> The Chinese material about "Objectify" is very few.
> And the English material, I read it, and still can't understand it.
>
> Could you tell me the simple explanation about "Objectify"?
> Thanks for your reply.
>
> Best Regards
> Tinker
>
>
> 2010/11/24 vaninh0 
>
> Hi Tinker,
>>
>> It´s just a suggestion, use the Objectify.
>> I've changed my project and the things are really better now!
>>
>> On 23 nov, 03:15, Tinker Pang  wrote:
>> > Hi didier
>> >
>> > I have the same question, too
>> >
>> > When I creat the parent Key
>> >
>> > How can I get the parent via Key?
>> >
>> > I tested many times and many ways, I can't get the parent,
>> >
>> > And why use Key to build entity relation? Could I use other type? for
>> > example int long string?
>> >
>> > Best Regards
>> > Tinker
>> >
>> > 2010/11/23 Didier Durand 
>> >
>> > > Hi Vaninho,
>> >
>> > > If you want to group some A, B & C entities in the same entity group,
>> > > you have to say (for example) that A is a parent of B (via a @Parent
>> > > Key key in B) and then that B is a parent of C (via a @Parent
>> > > Key in C).
>> >
>> > > You can add @Transient if you don't want the Keys to be stored as
>> > > properties of the entity
>> >
>> > > Then you can query with ancestor() filter.
>> >
>> > > regards
>> > > didier
>> >
>> > > On Nov 22, 9:10 pm, Jeff Schnitzer  wrote:
>> > > > This doesn't make any sense; entities in the GAE datastore cannot
>> have
>> > > > multiple *parent* keys.  However, your structure would work fine if
>> > > > you just dropped the @Parent annotation.
>> >
>> > > > This may help:
>> > >http://code.google.com/p/objectify-appengine/wiki/Concepts#Keys
>> >
>> > > > Jeff
>> >
>> > > > On Mon, Nov 22, 2010 at 10:22 AM, vaninh0 
>> wrote:
>> > > > > Hi Didier,
>> >
>> > > > > with Objectify is possible to create a Entity with two distinct
>> > > > > childrens?
>> >
>> > > > > example:
>> >
>> > > > > class A {
>> > > > > @Id Long Id;
>> > > > > }
>> > > > > class B {
>> > > > > @Id Long Id;
>> > > > > }
>> > > > > class C {
>> > > > > @Id Long Id;
>> > > > > @Parent Key a;
>> > > > > @Parent Key b;
>> > > > > }
>> >
>> > > > > regards,
>> > > > > vanio.
>> >
>> > > > > On 20 nov, 14:41, Didier Durand  wrote:
>> > > > >> Hi,
>> >
>> > > > >> I would recommend Objectify (which I use heavily): seems to match
>> your
>> > > > >> need.
>> >
>> > > > >> regards
>> > > > >> didier
>> >
>> > > > >> On Nov 20, 1:20 pm, Roberto Saccon  wrote:
>> >
>> > > > >> > maybe a good place to start is sourcecode of lowlevel-based
>> > > frameworks
>> > > > >> > like slim3 or objectify
>> > > > >> > --
>> > > > >> > Roberto
>> >
>> > > > >> > On Nov 20, 8:13 am, Tom  wrote:
>> >
>> > > > >> > > Hi there,
>> >
>> > > > >> > > I'm searching for information of entity relation ships in
>> > > appengine.
>> > > > >> > > JPA for example supports relations between entites
>> (one-to-one,
>> > > > >> > > ont-to-many, many-to-many). As far as I know by know the
>> > > underlying
>> > > > >> > > datastore doesn't direktly support this and not join queries
>> > > (different
>> > > > >> > > entities).
>> >
>> > > > >> > > How do you store Customer -> Orders in the datastore? Is
>> there low
>> > > > >> > > level API example code?
>> > > > >> > > Would I store an entity "Customer" with attributes and a list
>> of
>> > > order
>> > > > >> > > ids?
>> >
>> > > > >> > > Any help highly appreciated.
>> > > > >> > > Thanks
>> > > > >> > > Tom
>> >
>> > > > > --
>> > > > > 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-j...@googlegroups.com.
>> > > > > To unsubscribe from this group, send email to
>> > > google-appengine-java+unsubscr...@googlegroups.com
>> 
>> >
>> > > .
>> > > > > For more options, visit this group athttp://
>> > > 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-j...@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-j...@googlegroups.com.
>> To unsubscribe from this group, se