This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi. I want to know if there is a way to migrate from an existing (old 1.xx NHibernate) installation with already implemented classes, hbm mappings and all that to NHibernate Designer. It would make upgrades and modifications a lot cleaner, easier and would probably give us a better advantage with our product. Thanks. Jose |
|
|
Also. I'm wondering if NHibernate Designer also installs NHibernate and configures it, or how does that work... Thanks. Jose |
|
|
Unfortunately we cannot import existing models (either based on a code implementation or existing mapping files). We can however import from the existing database! So your best bet would be to make sure your database schema is up to date, use the Server Explorer to connect to the database and then drag all the appropriate tables/procs/views onto the design surface and that will create a new set of mappings based on the imported schema. This should be equivilant (but likely not exactly the same) as your existing model implementation. We dont "install" NHibernate, but we do add references to the NHibernate assemblies that we rely on for the generated code when you add a new model to your project so that things can compile once you have started modeling.
|
|
|
Ok. Thanks Jeremy. I'd say migration from existing configuration/classes files is THE one killer feature you might want to implement in the product. Even if you have a release that only have that feature, it would be awesome. With "install" I meant if the designer will configure NHibernate in the application but I guess that will be done automatically based on whatever the designer does and I don't have to deal with any of the configuration stuff. Thanks. Jose |
|
|
On second thought, If I have to import from database which will mean start from scratch with it, wouldn't be better to implement something like LightSpeed? I mean, what's the point for an existing app if it cannot be migrated. Jose. |
|
|
Yes, you would be creating the model again but it should just be equivalent to what you had before. We would certainly recommend having a look into LightSpeed but you should probably do this as a separate effort since presumably you will have a reasonable coupling to NHibernate and HQL etc in your app already.
|
|