-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: hibernate config file without any mappings
PostPosted: Tue Feb 03, 2004 7:25 pm 
Newbie

Joined: Sun Nov 09, 2003 12:34 pm
Posts: 15
I need to connect to multiple databases so I have created multiple configuration files. For some databases I just need the connection to run some stored procedures, so I do not have any mappings.

Question: Can I have a configuration file without mapping in it?

Currently, If i try without mappings, my session is not intialized, and get an error:
>>
The content of element type "session-factory" is incomplete, it must match "(property*,mapping+,(class-cache|collection-cache|jcs-class-cache|jcs-collection-cache)*)".
<<

-thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 04, 2004 1:00 am 
Expert
Expert

Joined: Fri Nov 07, 2003 4:24 am
Posts: 315
Location: Cape Town, South Africa
You've answered your own question.
Quote:
(property*,mapping+,(class-cache|collection-cache|jcs-class-cache|jcs-collection-cache)*)(property*,mapping+,(class-cache|collection-cache|jcs-class-cache|jcs-collection-cache)*)

The 'mapping+' restriction is what's hampering your efforts.

I would try (bear in mind that I have not tried any of these myself), in order of preference
1) Programatically configuring the session
2) mapping an simple arbitrary object from each of the databases (say table foo with column bar), but stick to the XML
3) using a properties file (no DTD validation)

BTW
what happens if you put an empty mapping element in ?


Top
 Profile  
 
 Post subject: with empty element you get parser error.
PostPosted: Wed Feb 04, 2004 8:53 am 
Newbie

Joined: Sun Nov 09, 2003 12:34 pm
Posts: 15
thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.