I have nHibernate working quite well on my brand new database. In fact it was quite helpful to have it generate the schema based on the mapping files.
However, I now have data in my tables and I need to start updating the schema. I don't want to use SchemaExport as that drops开发者_JS百科 all the tables. I don't want to use SchemaUpdate as I need some non-null columns. That leaves me with manual updates to the database. This is okay.
I make the changes and then run my unit tests. And they fail, but only some of them.
The queries that use .CreateCriteria return the data from the newly added columns The queries that use .CreateQuery do not include any data from the newly added columns
Any ideas why the difference is occurring?
If your CreateQuery methods are working on raw HQL strings it could be as simple (and tedious) as updating them.
精彩评论