I'm figthing a few days with hibernate and Pojos for integrate in GWT
client by RPC...
I generate the traditional pojos with Hibernate tools in Eclipse 3.2,
i parametrize the Set attributes, i make a junit test do see if
hibernate get the information to the pojo, everything ok.
When i try to integrate in the client, using the RPC, the subPojos
don't have any information...
ex:
public class POJOTest implements IsSerializable {
private long idDocente; //this have information
private String nome; //this have information
/**
*@gwt.typeArgs <java.util.Collection>
*/
private Set lectFichaUcs; //this don't have information
//getters and setters methods
...
}
So, can someone show me an example how to integrate direct Hibernate
with GWT 1.4RC, or say somethin how to fix that problem.
thanks
please post the error message!
have you define the model on the client side?
On 25 Jun., 16:14, Paulo <alves.paulohe...@gmail.com> wrote:
> Hello!
>
> I'm figthing a few days with hibernate and Pojos for integrate in GWT
> client by RPC...
> I generate the traditional pojos with Hibernate tools in Eclipse 3.2,
> i parametrize the Set attributes, i make a junit test do see if
> hibernate get the information to the pojo, everything ok.
> When i try to integrate in the client, using the RPC, the subPojos
> don't have any information...
>
> ex:
> public class POJOTest implements IsSerializable {
> private long idDocente; //this have information
> private String nome; //this have information
> /**
> *...@gwt.typeArgs <java.util.Collection>
The error is something like: "This application is out of date..."
regards
You have a Set of Collection objects? That seems a bit odd. You sure
you don't mean:
/**
*...@gwt.typeArgs <org.foo.MyObject>
*/
If you really have a set of sets of objects, you'd still need to
specify the inside type like:
/**
* @gwt.typeArgs <java.util.Set <org.foo.MyObject>>
*/
Not sure about that error message though..
fyi, for Hibernate you're still going to have to sort out changing
PersistentSet to HashSet & deal with CGLib proxies.
-jeff
Could you show me some Hibernate example with GWT client side?
Thanks
> > Could you show me some Hibernate example with GWT client side?- Hide quoted text -
>
> - Show quoted text -
You are likely going to have to have two sets of objects, one for
client side and one for server side and copy them back and forth...
yes... it is a pain.
- Brill Pappin
On Jun 25, 10:14 am, Paulo <alves.paulohe...@gmail.com> wrote:
> Hello!
>
> I'm figthing a few days with hibernate and Pojos for integrate in GWT
> client by RPC...
> I generate the traditional pojos with Hibernate tools in Eclipse 3.2,
> i parametrize the Set attributes, i make a junit test do see if
> hibernate get the information to the pojo, everything ok.
> When i try to integrate in the client, using the RPC, the subPojos
> don't have any information...
>
> ex:
> public class POJOTest implements IsSerializable {
> private long idDocente; //this have information
> private String nome; //this have information
> /**
> *...@gwt.typeArgs <java.util.Collection>
However, these objects are data transfer objects (DTOs), not actual
Hibernate objects; my Hibernate objects are EJB3 objects (with lots of
Java 1.5 annotations) and hence GWT can't (yet) handle them.
http://unrealities.com/seamgwt has the example code I'm talking about.
Cheers!
Rob
--> http://robjsoftware.org
About Hibernate and GWT integration issues, I wrote an article (not a
propaganda one, I also talk about DTO and Dozer ;-) ) at
http://hibernate4gwt.sourceforge.net/hibernate_gwt_problem.html
At last, concerning the Timestamp issue, I disagree with the GWT team
that classed the relevant RFE as low priority (http://code.google.com/
p/google-web-toolkit/issues/detail?id=87&can=2&q=) since it has no
workaround.
So I am working on porting this class by myself into the emulated JRE,
but it as a long and undocumented way...
Bruno
On 29 juin, 06:42, Rob Jellinghaus <rjellingh...@gmail.com> wrote:
> TheHibernatepojo has to be part of the GWT application SOMEHOW. I
> have tried making a separate module to contain the objects I send via
> GWT RPC. This works fairly well; the pojos can be in their own
> package, and then both my GWT code and my server code include them.
>
> However, these objects are data transfer objects (DTOs), not actualHibernateobjects; myHibernateobjects are EJB3 objects (with lots of
> Java 1.5 annotations) and hence GWT can't (yet) handle them.
>
> http://unrealities.com/seamgwthas the example code I'm talking about.
>
> Cheers!
> Rob
> -->http://robjsoftware.org
>
> On Jun 28, 7:34 pm, rp16 <pellerin.rich...@gmail.com> wrote:
>
> > Hi, I would like to know if it's mandatory to have theHibernatepojo
> > in the same package as the GWT application?
>
> > Thanks
>
> > On Jun 28, 5:22 am, amonbaz <amon...@gmail.com> wrote:
>
> > > I'm not sure I fully understood the problem. However, if you say it
> > > works on the server side but arrives as null to the client, it might
> > > beHibernate'sLAZY approach, which means that it actually retrieves
> > > lists and sets only when needed (using a proxy). Make sure that the
> > > object on the server side is filled with the set by marking this class
> > > as not-lazy, or you can just try to do it using the debugger (when you
> > > examine the set through the debugger it will retrieve it from the DB)
> > > and see if it gets to the client side.
> > > HTH.
>
> > > On Jun 27, 4:22 pm, Paulo <alves.paulohe...@gmail.com> wrote:
>
> > > > Ok, i fix, but now the pojo returns null, :(
>
> > > > Could you show me someHibernateexample with GWT client side?- Hide quoted text -