These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Bug? optimistic-lock=dirty / all and large object fields
PostPosted: Wed Aug 16, 2006 2:17 pm 
Beginner
Beginner

Joined: Thu Jun 29, 2006 12:32 pm
Posts: 22
Hibernate version: 1.2.0 alpha1

SQL Server 2005

When using optimistic concurrency on a class / table that contains NTEXT / TEXT columns, NHibernate generates an invalid SQL statement, as follows:

UPDATE MYTABLE SET COL1 = ?, MYNTEXT = ? WHERE ID = ? AND COL1 = ? AND MYNTEXT = ?

It fails as MYNTEXT is an NTEXT column, an this type of large-object cannot be compared with the equals operator - only supports IS [NOT] NULL.

I suspect a work around is to create a one-to-one child class mapping to the same table, that contains just the large-object column and set optimistic-concurrency to either none or version.

Hibernate supports optimistic-lock="false" at the property level - is this something we can back-port? I will be happy to do this and submit a patch.

Cheers,

Stu

_________________
--
Stuart Carnie


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.