Rogelio: This is likely in the Roo/Hibernate question, more hibernate than Roo. I replied to you in the Spring forum. We'll come back here if we see that's GWT related. I suspect is not.
Best regards, Alfredo On Tue, Mar 20, 2012 at 3:22 PM, Rogelio Flores <rogelio.flo...@gmail.com>wrote: > I have an issue that might be JPA/Hibernate-related, but it could also be > related to RequestFactory, so bear with me pls: > > I have the following JPA @Entity-s: > > class Profile { > @OneToMany(cascade = CascadeType.ALL) > List<Setting> settings = new ArrayList<Setting>(); > // other properties... > } > > class Setting { > @ManyToOne > SettingDefinition definition; > // other properties... > } > > class SettingDefinition { > // some properties - no relationships defined here > } > > When a list of Profiles is displayed on a GWT UI (produced by Spring Roo, > which uses RequestFactory), all their properties are displayed fine, except > the individual Settings in the List have null SettingDefinitions even if > they're not null in the db (I checked). I tried fetching eagerly and > forcing it to not be null with: > > @ManyToOne(fetch=FetchType.EAGER, optional=false) > SettingDefinition definition; > > and also increasing the hibernate.max_fetch_depth to more than three > (AFAIK, 3 is the default), but I can't get the Settings to have their > corresponding SettingDefinitions when they come from the server. Is there a > setting or something that can be done to force these referenced entities so > that they are fetched? > > (I posted this issue on the Roo forum but I've seen no response there: > > http://forum.springsource.org/showthread.php?124490-Fetching-eagerly-on-Lists-1-n > If > this can be solved by the RequestFactory framework, this should be the > right place to ask). > > -- > 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+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > -- Alfredo Quiroga-Villamil AOL/Yahoo/Gmail/MSN IM: lawwton -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.