I'm currently using one of the GWT-RPC DataSources to provide data
I also successfully used REST using XStream to automatically transform my objects to xml.
The issue I have is ridiculous: too much information!
For the SmartClient I only need the primary/foreign keys to links multiple datasources, but using Hibernate i get the whole object tree.
example:
so using Hibernate i get a Person with an Address inside!
To link the Person and Address Datasources, i only need the addess_fk and the address_id.
When i get the object tree and only take the foreign key, presentation works fine (despite wasting a lot of traffic)
but then, when changing an relationship, hibernate requires the object, not just the foreign_key.
I might fix that on serverside manually by loading the object from the db and put it in, but then i need to write the REST Transformer myself or provide a nearly-identical dublicate class to do it with xstream
Any idea, how i might fix that without writing a lot of server side transformers or dublicating value objects?
I can't use smartgwtee :(
I also successfully used REST using XStream to automatically transform my objects to xml.
The issue I have is ridiculous: too much information!
For the SmartClient I only need the primary/foreign keys to links multiple datasources, but using Hibernate i get the whole object tree.
example:
Code:
class Person{ int id; int name; Address address; // etc... } class Address{ int id; String city; // etc... }
To link the Person and Address Datasources, i only need the addess_fk and the address_id.
When i get the object tree and only take the foreign key, presentation works fine (despite wasting a lot of traffic)
but then, when changing an relationship, hibernate requires the object, not just the foreign_key.
I might fix that on serverside manually by loading the object from the db and put it in, but then i need to write the REST Transformer myself or provide a nearly-identical dublicate class to do it with xstream
Any idea, how i might fix that without writing a lot of server side transformers or dublicating value objects?
I can't use smartgwtee :(
Comment