-->
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.  [ 2 posts ] 
Author Message
 Post subject: Entity classes modification
PostPosted: Mon Apr 16, 2007 11:28 am 
Newbie

Joined: Mon Apr 16, 2007 9:39 am
Posts: 1
Location: France, Rennes
Hello everyone,
We are a group of french students in computer science working on a project whose the main goal is to compare differents O/R Mapping Framework for .NET

One of the questions we are trying to figure out refers to the evolution of the initial schema. It seems to be a topical point which determinates if a Framework can be useful or not in long term.

Here it is the problematic :
Can we make evolve the initial concept map of a program althought we are using a O/R Mapping Framework for many months without loose data contained in the data base.

Does NHibernate can automatically recognize modifications made on the structure of an entity class and repecute it on the structure of the data base associated without loosing any information contained the database ?

------------------------------------------------------------------------------

In ordre to illustrate the problem we try to realise some modifications on the structure of our entity class

--> Can we easily add in the code a new attribute in an entity class without loosing any data
Can NHibernate allows us to specify a default values which would be attributed to the objects stored previously in the database ?

--> In a same way, is to possible to delete an attribute, change a type of an attribute,change a name of an attribute, change a type of relation (1-n to n-n) ?

------------------------------------------------------------------------------

We are currently trying to add a new attribute in an entity bean. The problem is that NHibernate doesn't take care of the modification made when we start the program and consequently doesn't update the structure of the database !

Thanks in advance,

_________________
Abyss-Yclette Project


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2007 2:56 pm 
Expert
Expert

Joined: Tue Aug 23, 2005 5:52 am
Posts: 335
If you've updated your POCO and it's mapping appropriately I think you can use the SchemaExport tool (which can also be used from the Configuration class I think, so you can call it at startup). You might want to look further into the documentation for SchemaExport.

Cheers,

Symon.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.