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. 


About Joshua Lockwood

I code stuff and people pay me for it.
This entry was posted in NHibernate, Oracle, Programming. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

2 Responses to CLOBbered again!

  1. 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?

  2. jlockwood says:

    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.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>