• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Restrictions constraints in Hibernate

 
Frank Truong
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Do you have any working examples on how to setting restriction constraint of property that maps to a Clob type in database table?
For instance, calling

where propertyName is mapping to a Clob-typed column in a table.

I always got java.sql.SQLException: ORA-00932: inconsistent datatypes: expected NUMBER got LONG exception

How do you use Restrictions.sqlRestriction(sql)? Would it be a possible replacement?

I have been spending time converting 'propertyName' from Clob to String in hoping Hibernate will stop complaining about data mismatch when comparing it against value(String) I pass in 2nd parameter. Not successful so far! I am not a DB guy:-)

Hoping you offer me some clues.

Thank you very much.

 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the Spring forum. Your question is about Hibernate, so I going to move this to the ORM forum, where Hibernate questions go.

Thanks

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic