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 

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: Google App Engine with MySQL Database.

2010-11-23 Thread Tinker Pang
Hi

I study app engine a long time, and I have been confused
Why App Engine don't support mySql?

Why use the JDO/JPA?

Best Regards
Tinker


2010/11/23 Didier Durand 

> Hi,
>
> mySql is not (at least currently) directly supported on App Engine,
> you have to use the datastore based on Google BigTable and interface
> with it via JDO/JPA: see appropriate docs on Dev Guide
>
> You can also use 3rd party extensions to interface: I personally use
> Objectify.
>
> You can also probably access a remote mySql server from App Engine but
> I would not do it: slow, unsecure, etc..
>
> regards
> didier
>
> On Nov 21, 5:58 pm, ankit  wrote:
> > Hi..
> > I have deployed an application which is connected to my MySQL database
> > to fetch the values.
> > I want to know how will google fetch values from my machine and show
> > the result whenever user runs the application. Do i have to create a
> > database on google server? If yes than how can i create it.Since i am
> > using google app on free basis,so do i need to pay for the database or
> > is it free??
> > I have read that google supports MYSQL,so how can i use MYSQL as a
> > backend for my application..
> >
> > Any idea or suggestions are welcome.
> > Thanks in advance..
> >
> > Ankit
>
> --
> 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.