CLOBbered again!


Hey all,

I'm currently working on an NHibernate on Oracle project and ran into the first problem with CLOBs that I've had in some time.  I was trying to use a property that mapped to a CLOB in a Example instance for a session Criteria object.  No dice.  Oracle complained saying this:

System.Data.OracleClient.OracleException: ORA-00932: inconsistent datatypes: expected - got CLOB

Well, I guess sometimes you get lucky...and sometimes you just get CLOBbered.

Guess now I have to dig into the NHibernate code if I have time.  All other CRUD works nice with Clobs, just Example chokes.  Could just be a dialect thing. 

Cheers!


Posted Aug 28 2007, 06:47 PM by jlockwood

Comments

Ben Scheirman wrote re: CLOBbered again!
on 08-29-2007 8:34 AM
I've never used NHibernate with Oracle, but I've used CLOB before. What does your mapping look like? Can you provide more details on what data goes in the property?
jlockwood wrote re: CLOBbered again!
on 08-31-2007 9:58 PM

Basic text goes into the CLOB, typically less than 250 chars.  In the mapping you aren't supposed to have to specify type with Oracle when mapping to CLOBs (NHibernate is supposed to do that).  I did, however, run my tests while specifying type="StringClob".  Test failed the same.  Again, the mappings work in all cases except when I try to use it with the Example class.

Add a Comment

(required)  
(optional)
(required)  
Remember Me?

Enter the numbers above:
Copyright Los Techies 2007, 2008. All rights reserved.
Powered by Community Server (Commercial Edition), by Telligent Systems