help : app engine datasource

47 views
Skip to first unread message

Akram Moncer

unread,
May 7, 2012, 9:12:25 AM5/7/12
to google-we...@googlegroups.com
hello,

i'm working on a web application with GWT,JPA, and google app engine, and i have this kind of association between entity :

@Entity
public class Person{
    
     @id
     Long person_Id;

    @OneToOne(cascade=CascadeType.ALL,fetch=FetchType.LAZY)
    @JoinColumn(name="car_Id",referencedColumnName="car_Id")
    private Car car;
}

@Entity
public class Car{
     @id
      Long car_Id;

     string color;

}


can someone tell me how can i get the color of the car of each person with entitymanager
thanks

--
Akram MONCER
Personne

Brandon Donnelson

unread,
May 8, 2012, 4:26:14 PM5/8/12
to google-we...@googlegroups.com
Are you using RPC or RequestFactory? Do you need the query or are you wondering why the results for the collection aren't coming back?

Akram Moncer

unread,
May 8, 2012, 5:15:49 PM5/8/12
to google-we...@googlegroups.com
i use RPC and i need the query


Are you using RPC or RequestFactory? Do you need the query or are you wondering why the results for the collection aren't coming back?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/rPphmktafzAJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
Akram MONCER
Personne

Brandon Donnelson

unread,
May 8, 2012, 5:39:56 PM5/8/12
to google-we...@googlegroups.com
I'd recommend downloading the GWT SDK, unzip and goto samples>Expenses and check out the examples. I might suggest changing the FetchType.Lazy to .Eager if your having problems and back off later if you need.

Have a good day,
Brandon Donnelson

Akram Moncer

unread,
May 8, 2012, 6:06:32 PM5/8/12
to google-we...@googlegroups.com
the google app engine datastore don't accepte the fetchtype.Eager, so this oblige me use the fetchtype.lazy



2012/5/8 Brandon Donnelson <branfl...@gmail.com>
I'd recommend downloading the GWT SDK, unzip and goto samples>Expenses and check out the examples. I might suggest changing the FetchType.Lazy to .Eager if your having problems and back off later if you need.

Have a good day,
Brandon Donnelson


On Tue, May 8, 2012 at 2:15 PM, Akram Moncer <akram....@gmail.com> wrote:



--
Akram MONCER
Personne

Brandon Donnelson

unread,
May 8, 2012, 6:11:32 PM5/8/12
to google-we...@googlegroups.com
Hmmm... I'm pretty sure you can annotate an eagerly fetch.


Have a good day,
Brandon Donnelson


Patrick Julien

unread,
May 8, 2012, 10:02:16 PM5/8/12
to google-we...@googlegroups.com
Yes, it does.  You'll get a warning on startup but otherwise everything works as it should


On Tuesday, May 8, 2012 6:06:32 PM UTC-4, Akram.Moncer wrote:
the google app engine datastore don't accepte the fetchtype.Eager, so this oblige me use the fetchtype.lazy

I'd recommend downloading the GWT SDK, unzip and goto samples>Expenses and check out the examples. I might suggest changing the FetchType.Lazy to .Eager if your having problems and back off later if you need.

Have a good day,
Brandon Donnelson


On Tue, May 8, 2012 at 2:15 PM, Akram Moncer <akram....@gmail.com> wrote:
i use RPC and i need the query


Are you using RPC or RequestFactory? Do you need the query or are you wondering why the results for the collection aren't coming back?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/rPphmktafzAJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
Akram MONCER
Personne

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
Akram MONCER
Personne

Akram Moncer

unread,
May 9, 2012, 4:27:22 AM5/9/12
to google-we...@googlegroups.com
thanks, i try the Eager fetch and it generate a warning but it works great.

2012/5/9 Patrick Julien <pju...@gmail.com>
Yes, it does.  You'll get a warning on startup but otherwise everything works as it should

On Tuesday, May 8, 2012 6:06:32 PM UTC-4, Akram.Moncer wrote:
the google app engine datastore don't accepte the fetchtype.Eager, so this oblige me use the fetchtype.lazy

I'd recommend downloading the GWT SDK, unzip and goto samples>Expenses and check out the examples. I might suggest changing the FetchType.Lazy to .Eager if your having problems and back off later if you need.

Have a good day,
Brandon Donnelson


On Tue, May 8, 2012 at 2:15 PM, Akram Moncer <akram....@gmail.com> wrote:
i use RPC and i need the query


Are you using RPC or RequestFactory? Do you need the query or are you wondering why the results for the collection aren't coming back?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/rPphmktafzAJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
Akram MONCER
Personne

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
Akram MONCER
Personne

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
Akram MONCER
Personne

Reply all
Reply to author
Forward
0 new messages