RequestFactory Sending EntityProxy with Associated Entites Fields as null

2013-02-17 Thread Aryan
Hi all,
 
At first is it a necessity to use 'InstanceRequest' for persisting 
Entites?
 
Anyway what I am doing is 
_
client
 
 creating a proxy - calling edit() [request.edit(proxy)] - set the data 
to proxy e.g.
proxy.setName(name')
...
...//Also some where setting the field for associted type
 
...//how I get a countryProxy is like this 
...requestCon.findById(123).fire  
 
proxy.setCountry(countryProxy); // I am sure countryProxy has required 
field. *checked for 'ID' i.e countryProxy.getId() != null
..
 
- call RequestContext appropriate method to save it to database.
 
request.save(proxy).fire.
 
__
On servier side..
 
public void save(MyEntiry me) {
 me.getCountry() != null; //Yesss!!! country is not null ... there is 
something
 me.getCountry().getId() == null; //Yes!... Id field is null ... on 
client side it wasn't
 
}
___
 
I need to load the associated entities to hibernate session at least it 
could have given me ID. :(
 
 
 
At the same time an udate method is working fine somehow ... !!! 
uses hbmSession.saveorupdate(. 
may be its just ignoring associated nulls... I have to yet check it out.
 
I have a presentation for this app tomorrow... 
 
Help!!!. 
Please!
 

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: RequestFactory Sending EntityProxy with Associated Entites Fields as null

2013-02-17 Thread Aryan
Hi,
 
It's seems if I use the same RequestContext reference to create Proxy it 
doesn't give a problem...
 
But what if I am getting a proxy from somewher else already populated with 
values ...
 
is there a way to use that proxy or I just have to do all the setters and 
getters to create new proxy from the existing one.!
 
 

On Sunday, 17 February 2013 18:53:00 UTC+5:30, Aryan wrote:

 Hi all,
  
 At first is it a necessity to use 'InstanceRequest' for persisting 
 Entites?
  
 Anyway what I am doing is 
 _
 client
  
  creating a proxy - calling edit() [request.edit(proxy)] - set the data 
 to proxy e.g.
 proxy.setName(name')
 ...
 ...//Also some where setting the field for associted type
  
 ...//how I get a countryProxy is like this 
 ...requestCon.findById(123).fire  
  
 proxy.setCountry(countryProxy); // I am sure countryProxy has required 
 field. *checked for 'ID' i.e countryProxy.getId() != null
 ..
  
 - call RequestContext appropriate method to save it to database.
  
 request.save(proxy).fire.
  
 __
 On servier side..
  
 public void save(MyEntiry me) {
  me.getCountry() != null; //Yesss!!! country is not null ... there is 
 something
  me.getCountry().getId() == null; //Yes!... Id field is null ... on 
 client side it wasn't
  
 }
 ___
  
 I need to load the associated entities to hibernate session at least it 
 could have given me ID. :(
  
  
  
 At the same time an udate method is working fine somehow ... !!! 
 uses hbmSession.saveorupdate(. 
 may be its just ignoring associated nulls... I have to yet check it 
 out.
  
 I have a presentation for this app tomorrow... 
  
 Help!!!. 
 Please!
  


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: RequestFactory Sending EntityProxy with Associated Entites Fields as null

2013-02-17 Thread Aryan
Pheww,
 
Caught the culprit... The Locators.
---
 
@Override
 
*public* MyDto find(Class? *extends* MyDto clazz,*final* Integer id) {

*return *new MyDAO.findById(id);//Earilier - return create(clazz); 

}
-
 
Beware whenever you are going for the '*Eclipse RPC Generater.'   *
Rather I am thinking now I could have saved a lot of time and done this by 
using 'Reg-ex'
 
 

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.