Hi,
i'm using nHibernate with the Oracle.DataAccess Components
(2.111.7.20).
I get an "System.OverflowException: Arithmetic operation resulted in
an overflow." exception when i want to read an Decimal with more than
the .net supportet digits. I looked around in various forums and
searched for an solution but the only solutions were to manipulate the
sql statements like truncating or doing rounds. Ok this sounds good.
But what could be the solution when you want to load mapped entities
lazily?
Is there any way to tell nhibernate to automatically generate an
statement with the trunc or round function?
My Mapping (NHibernateMappingAttributes) looks like this:
[Property(Column = "MYNUMBERVALUE")]
public virtual Decimal MyNumberValue{ get; set; }
I tried to set the Precision or Length Attribute without the desired
result.
The Exception looks like this:
System.OverflowException: Arithmetic operation resulted in an
overflow.
at Oracle.DataAccess.Types.DecimalConv.GetDecimal(IntPtr numCtx)
at Oracle.DataAccess.Client.OracleDataReader.GetDecimal(Int32 i)
at Oracle.DataAccess.Client.OracleDataReader.GetValue(Int32 i)
at Oracle.DataAccess.Client.OracleDataReader.get_Item(Int32
i)........
An this is how i will use the Entity:
TheAffectedEntity a = p.SomeOtherEntity.TheAffectedEntity;
I hope you understand what my problem is.
Thanks in advance for your replies.
Regards
Ralph
--
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.