Page 1 of 1

Adding an Oracle table with column type of VARCHAR2 creates a System.Object type in the context

Posted: Fri 12 Apr 2013 07:50
by neiltrodden
So in Visual Studio, if I update my model from the Oracle database, table columns that are the type of varchar2 are mapped to System.Object types in the table models which causes errors with Linq queries. If I go into the .lqml file and edit as xml, I can replace System.Object with System.String and everything works fine.

Can you suggest how I can make this mapping happen automatically, or perhaps suggest what I may be doing wrong to get this type of behaviour? Thanks!

Re: Adding an Oracle table with column type of VARCHAR2 creates a System.Object type in the context

Posted: Mon 15 Apr 2013 12:02
by MariiaI
Thank you for the report. We will inform you when the new build of LinqConnect with the fix is available for download.
As a workaround, you could try doing the following:
- open Tools -> Entity Developer -> Options -> Server Options -> Oracle;
- press the "Add" button for adding a new type mapping rule;
- set the .NET type to 'String' and Server Type to 'VARCHAR2';
- press 'OK' to save the changes.

Re-create your model in order for changes to become effective for all entity classes( use "Update Model from Database" wizard with the selected "Recreate Model" check box).

Re: Adding an Oracle table with column type of VARCHAR2 creates a System.Object type in the context

Posted: Mon 15 Apr 2013 15:13
by neiltrodden
Thanks for your help, I didn't realise this option was available for me to create my own mappings!

Re: Adding an Oracle table with column type of VARCHAR2 creates a System.Object type in the context

Posted: Fri 19 Apr 2013 06:50
by MariiaI
The new build of LinqConnect 4.2.229 is available for download now. It can be downloaded from http://www.devart.com/linqconnect/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information please refer to http://forums.devart.com/viewtopic.php?f=31&t=26911

Re: Adding an Oracle table with column type of VARCHAR2 creates a System.Object type in the context

Posted: Fri 19 Apr 2013 08:06
by neiltrodden
Awesome, thanks!