views:

39

answers:

1

I always see a single file being used for named query. I have never seen multiple file for queries, but can it be done?

+1  A: 

Yes. You can add as many as you want.

It's actually a mapping file, but hibernate doesn't care if there isn't a class mapping definition in there.

See http://docs.jboss.org/hibernate/stable/core/reference/en/html_single/#configuration-xmlconfig

You should add a

<mapping resource="path/to/your/Mapping-or-query-file.hbm.xml"/>
Eran Harel