Version properties (NH) not being saved OK in .hbml
Posted: Sun 04 Dec 2016 10:10
Hi, I've just noticed some problems with model saving when you have a property marked as 'Version' in a NHibernate model (Entity Developer v6.0.116.0).
Let's start with a model with a single entity containing one int PK property called 'P1' and one timestamp Version property 'P2'. I press the save button, close the model , reopen it and everything is working as expected. From there:
Problem 1: I delete P2, press save, close the model and reopen it. P2 is still there although the only property that should be there is P1. If I want to delete a version property I have to uncheck the 'Version' checkbox, save the model, delete the property and save again.
Problem 2: I set any value por P2 Unsaved value, press save, close the model and reopen it. If I look at the property editor for P2, the unsaved value has dissapeared. It's pretty annoying, as you have to remember to manually add the unsaved-value to the .hbm.xml each time you regenerate the files.
Could you please check this out? Thanks!
Let's start with a model with a single entity containing one int PK property called 'P1' and one timestamp Version property 'P2'. I press the save button, close the model , reopen it and everything is working as expected. From there:
Problem 1: I delete P2, press save, close the model and reopen it. P2 is still there although the only property that should be there is P1. If I want to delete a version property I have to uncheck the 'Version' checkbox, save the model, delete the property and save again.
Problem 2: I set any value por P2 Unsaved value, press save, close the model and reopen it. If I look at the property editor for P2, the unsaved value has dissapeared. It's pretty annoying, as you have to remember to manually add the unsaved-value to the .hbm.xml each time you regenerate the files.
Could you please check this out? Thanks!