Page 1 of 1

Version properties (NH) not being saved OK in .hbml

Posted: Sun 04 Dec 2016 10:10
by DarkCamper
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!

Re: Version properties (NH) not being saved OK in .hbml

Posted: Mon 05 Dec 2016 19:20
by Shalex
Thank you for your report. We will notify you when the issues are fixed.

Re: Version properties (NH) not being saved OK in .hbml

Posted: Fri 09 Dec 2016 18:53
by Shalex
The bug with saving / deleting a class property with the Version=True option is fixed: viewtopic.php?f=32&t=34681.

Re: Version properties (NH) not being saved OK in .hbml

Posted: Fri 09 Dec 2016 19:46
by DarkCamper
I've just tried the new version and it's certainly fixed :D

Thank you for your quick support!