In release notes of *2.1.0 Alpha3* found fixed issues, probably related to 
this bug:
NH-1756 <https://nhibernate.jira.com/browse/NH-1756>
NH-1788 <https://nhibernate.jira.com/browse/NH-1788>

So, I will have to review a version concept in our software and use the 
correct one :)

2014 m. gegužė 15 d., ketvirtadienis 09:21:33 UTC+3, cremor rašė:
>
> You might want to read the documentation: 
> http://nhforge.org/doc/nh/en/index.html#mapping-generated
>
> generated="always" tells NHibernate that this property is generated (on 
> insert) or changed (on update) by the database itself (e.g. in a trigger). 
> Therefore NHibernate doesn't try to insert/update it, as it would be 
> overwritten anyway. It even has to select it after each insert/update to 
> get the current value. Therefore, the old behaviour was just a bug that was 
> fixed. If that property isn't actually generated in your database, you'll 
> have to change your mappings.
>
> On Wednesday, May 14, 2014 1:12:15 PM UTC+2, Donatas wrote:
>>
>> During migration from NH 1.2.1 to 3.3.3 found that version property is no 
>> more updated. Version property mapping has generated="always":
>> <version name="RecordTimestamp" column="RECORDTIMESTAMP" type="timestamp" 
>> unsaved-value="null" generated="always" />
>>
>> After some investigation I found that property not updated since *NH 
>> 2.1.0 Alpha3*. I have run the same test case with different NH 
>> assemblies and captured Sql statements with NHProfiler:
>>
>> *2.1.0 Alpha2*
>> UPDATE TEST_RECORDTIMESTAMP
>> SET    RECORDTIMESTAMP = TIMESTAMP '2014-05-14 10:16:02' /* :p0 */,
>>        RECORDTEXT = '[v2.1.0.1002] 2014-05-14T07:16:02.0833554Z' /* :p1 */
>> WHERE  RECORDTIMESTAMPID = 5 /* :p2 */
>>        AND RECORDTIMESTAMP = TIMESTAMP '2014-05-14 10:13:33' /* :p3 */
>>
>> *2.1.0 Alpha3*
>> UPDATE TEST_RECORDTIMESTAMP
>> SET    RECORDTEXT = '[v2.1.0.1003] 2014-05-14T07:18:10.6742132Z' /* :p0 */
>> WHERE  RECORDTIMESTAMPID = 5 /* :p1 */
>>        AND RECORDTIMESTAMP = TIMESTAMP '2014-05-14 10:16:02' /* :p2 */
>>    
>> Can anyone explain what fix has affected this behavior? And what would be 
>> the easiest way to fix it? The problem is that I have hundreds of NH 
>> mappers (.hbm.xml files) and I don't want to modify them.
>>
>> PS tested on Oracle database
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to