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.  [ 1 post ] 
Author Message
 Post subject: Database consistency?
PostPosted: Wed May 28, 2008 5:10 pm 
Newbie

Joined: Wed May 28, 2008 5:04 pm
Posts: 3
Hey,

I'm currently migrating from Castle ActiveRecord to pure NHibernate and ran into a small bump.

I used to have ActiveRecord verify the consistency between my mapping and the actual database on application start-up (and provide options for recreating the database etc) using a property named "VerifyModelsAgainstDBSchema".

Now I was wondering if there was anything like this in NHibernate? I looked up the code in Castle and what they're doing is basically to preform a select from all tables with a where clause that's 1=0 and then re-wrapping any exceptions to a general type.

Now I can't be the only one who wants to implement something like this - is there a neat trick I missed in the documentation or a good way to do something like this?

I was thinking something in the lines of using GetAllClassMetadata() from the SessionFactory to get all the types mapped and then do a trick like the Castle guys.

Any ideas - comments?

Thanks,
- Rasmus.


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

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.