• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Restrictions constraints in Hibernate

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic