aspose file tools
The moose likes Object Relational Mapping and the fly likes Restrictions constraints in Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "Restrictions constraints in Hibernate" Watch "Restrictions constraints in Hibernate" New topic
Author

Restrictions constraints in Hibernate

Frank Truong
Ranch Hand

Joined: Nov 19, 2002
Posts: 39
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

Joined: Feb 05, 2001
Posts: 17234
    
    1

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Restrictions constraints in Hibernate
 
Similar Threads
Indirect addressing using Ant
Clob to String (Using Hibernate)
Converting a String to Clob for insert into DB
String -> MySQL CLOB
updating a CLOB field using oracle