Page 1 of 1

How can i define the mapped fieldtype for oracle numbers

Posted: Mon 27 Jun 2011 19:23
by capo
Hello,
i do an asp.net application and i create a LINQ-Modell to access the data of my oracle database. Unfortunately most of my NUMBER fields are mapped as System.Double instead of System.Int64.
As i red in your documentation there are some possibilities, to chosse the mapped type when creating an entity model. But in lqml a NUMBER(10,0) is always mapped as a double type.

Isn't there a way to define a NUMBER(10) as System.Int64?

Thanks,
Christian

Posted: Wed 29 Jun 2011 14:09
by Zero-G.
Hey

As I understood from the Oracle datatypes definition, NUMBER can have a precision value, like Number(10,2), so the only correct datatype for an ORM, is double. and not int64.

I don't know much about Oracle, because I use mySQL. - But isn't there a datatype like BigInt? - This will be translated to int64.

So, I think, that this is a database design behaivor.

Hope this will help you!?

Posted: Wed 29 Jun 2011 14:27
by StanislavK
At the moment, you can change the data type used for a particular entity field manually. To do so, please double-click the corresponding field in the model designer, and change its 'Type' property to 'long (System.Int64)'. Please tell us if this helps.

Also, we plan to support custom number mappings in Entity Developer, but cannot provide any timeframe for this at the moment.

Posted: Fri 01 Jul 2011 09:05
by capo
Sure i can change the type of the field manually, it is just a lot of work and a point of possible failures. Unfortunately i can't select many field to change the fieldtype.
So it would be really helpful to have the custom number mapping!

@Zero-G: In Oracle you have just the number fieldtype. There is a type integer too, but technical oracle uses a number with the scale of 0. So if I got a NUMBER(10,0) it is a Int64. But you are right, the scale is important here and e.g. a NUMBER(4,2) needs to be maped as a floating type.

Posted: Fri 09 Dec 2011 17:01
by StanislavK
The possibility of changing the default data type mapping used by Entity Developer is implemented in the latest 3.1.19 build of LinqConnect. The new build can be downloaded from
http://www.devart.com/linqconnect/download.html
(the trial version) or from Registered Users' Area (for users with active subscription only).

For the detailed information about the fixes and improvements available in LinqConnect 3.1.19, please refer to
http://www.devart.com/forums/viewtopic.php?t=22844