I second Bruno and would add a few things. You can group entities and
queries into DAOs and not pure entities and queries. So, to summarize:

- Each DAO goes into it's own .hbm.xml file. This contains the core
entity for that DAO and a few peripherial ones, i.e. Employee being
the core and, Address and File the auxiliary ones, as long as the
entity is not shared among multiple entities. Then it would go into
it's own file.

- Queries for a DAO go into the same .hbm.xml file like the main
entities for that DAO. You might for instance want to do LEFT JOIN
FETCH to work around lazy loading ( = null during RPC serialization
with Gilead)

- Since your application probably will be running on multiple
environments (i.e. your laptop and a web hoster), I would do all the
static configuration in the hibernate.xml file and off-load the
environment specific configuration into the applicationContext.xml via
properties on the LocalSessionFactory bean.

On May 20, 10:00 pm, noon <bruno.marches...@gmail.com> wrote:
> Hi,
>
> Looks like the hibernate.cfg.xml file is the one used to define
> relationship (the good practice is to have a mapping file for each
> Domain class, such as User.hbm.xml, Message.hbm.xml, and so on).
> Of course, since GWT 1.5, you can define your mapping attributes using
> annotations (so you can use GWT-Validator on your domain classes for
> example).
>
> Hope this helps
> Bruno
>
> PS : I agree with you Paul. Jim, instead of spamming every Hibernate
> thread, maybe you could try to answer the Hibernate question, it would
> be helpful ;-)
>
> On 20 mai, 20:35, Paul Grenyer <paul.gren...@gmail.com> wrote:
>
> > Hi
>
> > > If you find Hibernate is difficult to use, you may try Dreamsource ORM
> > > for your application. You can find an GWT example in
> > >http://www.gwtorm.com/mail/Mail.html.
>
> > Is anyone else getting a little sick of this constant gratuitous
> > on-list plugging?
>
> > --
> > Thanks
> > Paul
>
> > Paul Grenyer
> > e: paul.gren...@gmail.com
> > w:http://www.marauder-consulting.co.uk
> > b: paulgrenyer.blogspot.com
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to