fail on persists: what is the value that it claims is outside the
expected range?

fail on load: one possible explanation for the invalid cast is that
oracle's dbprovider may return a boxed uint, i.e. a UInt32 instance.
With the mapping with Int32 probably something is trying to cast that
boxed uint directly to an int, which is not valid (you would have to
unbox it first). Another explanation may be that you have NULL in the
database, causing the oracle provider to return DbNull.Value.

/Oskar


2009/11/30 Victor Rosenberg <[email protected]>:
> Thanks for the answer.
>
> I think it fails of translating from whatever type oracle's ODP
> returns to the uint property.
> There is a value returned, and its even a small integer one.
>
> On Nov 30, 7:58 pm, Fabio Maulo <[email protected]> wrote:
>> for example you have a null and a not nullable property.
>>
>> 2009/11/30 Fabio Maulo <[email protected]>
>>
>>
>>
>> > If the query is valid what is invalid is a value.
>>
>> > 2009/11/30 Victor Rosenberg <[email protected]>
>>
>> > When using the uint mappings:
>> >> "Value doesn't fall within the expected range" - fails somewhere in
>> >> the oracleParameter.st_dbtype while trying to persist
>> >> When using the int mappings:
>> >> "Couldn't execute query (<valid sql select query here>)
>> >> Inner exception - Specified cast not valid" - fails when loading the
>> >> object from the db
>>
>> >> On Nov 30, 11:07 am, Oskar Berggren <[email protected]> wrote:
>> >> > Specifying the exceptions might be a good idea.
>>
>> >> > /Oskar
>>
>> >> > 2009/11/30 Victor Rosenberg <[email protected]>:
>>
>> >> > > Hey guys
>> >> > > I am having some problems with mapping uint properties.
>> >> > > I am using oracle, the relevant table column is of INTEGER datatype.
>> >> > > The mapped class has uint property.
>> >> > > When the mapping is like that:
>> >> > > <property name="xxx" column="yyy" type="UInt32"/> - there are
>> >> > > exceptions trying to persist the class.
>> >> > > For <property name="xxx" column="yyy" type="Int32"/> - there are
>> >> > > exceptions trying to load it.
>> >> > > Skipping the type declaration doesnt help either.
>> >> > > Any ideas?
>>
>> >> > > Thanks in advance
>>
>> >> > > --
>>
>> >> > > You received this message because you are subscribed to the Google
>> >> Groups "nhusers" group.
>> >> > > To post to this group, send email to [email protected].
>> >> > > To unsubscribe from this group, send email to
>> >> [email protected]<nhusers%[email protected]>
>> >> .
>> >> > > For more options, visit this group athttp://
>> >> groups.google.com/group/nhusers?hl=en.
>>
>> >> --
>>
>> >> You received this message because you are subscribed to the Google Groups
>> >> "nhusers" group.
>> >> To post to this group, send email to [email protected].
>> >> To unsubscribe from this group, send email to
>> >> [email protected]<nhusers%[email protected]>
>> >> .
>> >> For more options, visit this group at
>> >>http://groups.google.com/group/nhusers?hl=en.
>>
>> > --
>> > Fabio Maulo
>>
>> --
>> Fabio Maulo
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/nhusers?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.


Reply via email to