db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Federico Fissore <federico.fiss...@concept.it>
Subject Problems with CLOB and Peer.doDelete(obj)
Date Fri, 10 Feb 2006 11:02:21 GMT
Hello all list readers

This is the first time I write on the list, so I introduce myself. I'm 
Federico Fissore, java developer for Concept, an italian software house. 
We use torque for all our (mostly web) projects.

I got a problem with torque3.1.1 when deleting and object using its 
peer. I think the problem is with the definition of the buildCriteria 
Here the situation.

I got one table schemed this way

 <table name="SomeTable">
  <column name="id" primaryKey="true" autoIncrement="true" 
required="true" type="INTEGER"/>
  <column name="name" size="300" type="VARCHAR"/>
  <column name="comments" required="true" type="CLOB"/>

In my app code, I got
 SomeTablePeer.doDelete( (SomeTable) obj );

On MSSQL this statement throws a SQLException, stating that it not 
possible to use comparator with TEXT/NTEXT/etc fields.
In the BaseSomeTablePeer, in the
 public static Criteria buildCriteria( SomeTable obj )

method I got the row
 criteria.add(COMMENTS, obj.getComments());

So I understand torque is deleting a row identifying it using all table 
columns in a where statement, but on SQLServer this can't be done so easily.

I checked torque3.2, and the problem persists. It was solved for the 
binary column type (BLOB) but it persists with CLOB

Have you had this problem too? How have you solved it?

Thank you all



To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

View raw message