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: Check hbm files before NHibernate initialize
PostPosted: Thu Jun 05, 2008 8:15 am 
Hi all,

When I write an hbm mapping file and put a wrong table name, for example, on it, NHibernate starts fine with no error.
I only get this error when I'll try to select, some register.

My question is...Is there any way to check these mapping files BEFORE NHibernate initialize? Or at least, when its starting?

Tks


Top
  
 
 Post subject:
PostPosted: Mon Jun 16, 2008 10:52 am 
Senior
Senior

Joined: Thu Jun 21, 2007 8:03 am
Posts: 127
Location: UK
Hi,

I think this would require a round-trip to the database to check. I don't believe there is anything automatic in NHibernate to do this for you, but you could maybe look at the SchemaUpdate() function.

Failing that, you could write a loop yourself to check each type of object at startup.

Regards,
Richard


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 16, 2008 12:10 pm 
Tks a lot.
I'll make some tests with your idea


Top
  
 
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.