This question is locked. New answers and comments are not allowed.
Hello,
I tried to add a domain model for some table and I got this error when trying to map a creation procedure.
---------------------------
Metadata exception
---------------------------
The metadata for field '_gEOMETRY' of class 'OracleService.V_JUDETE' cannot be initialized: Type converter initialization failed. The converter with name 'Telerik.OpenAccess.RT.Adonet2Generic.OracleUdt2StringConverter, Telerik.OpenAccess.Adonet2, Version=2011.1.411.2, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' does not convert from CLR type 'System.Object' to SQL type 'SDO_GEOMETRY'.
Parameter name: converterName
Actual value was Telerik.OpenAccess.RT.Adonet2Generic.OracleUdt2StringConverter, Telerik.OpenAccess.Adonet2, Version=2011.1.411.2, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342.
---------------------------
OK
---------------------------
So does OpenAccess support oracle sdo_geometry?
Best regards
I tried to add a domain model for some table and I got this error when trying to map a creation procedure.
---------------------------
Metadata exception
---------------------------
The metadata for field '_gEOMETRY' of class 'OracleService.V_JUDETE' cannot be initialized: Type converter initialization failed. The converter with name 'Telerik.OpenAccess.RT.Adonet2Generic.OracleUdt2StringConverter, Telerik.OpenAccess.Adonet2, Version=2011.1.411.2, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' does not convert from CLR type 'System.Object' to SQL type 'SDO_GEOMETRY'.
Parameter name: converterName
Actual value was Telerik.OpenAccess.RT.Adonet2Generic.OracleUdt2StringConverter, Telerik.OpenAccess.Adonet2, Version=2011.1.411.2, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342.
---------------------------
OK
---------------------------
Best regards
6 Answers, 1 is accepted
0
Hi Kineas,
Yes, Telerik OpenAccess ORM supports Oracle sdo_geometry types. Unfortunately, the manual setup process is a bit more complex for Oracle, as the CLR type that represents such a column is user-written and can use any name and assembly; MSSQL has a fixed type for that. You have to implement custom type converters in order to prepare the CLR types out of the query results.
Ralph
the Telerik team
Yes, Telerik OpenAccess ORM supports Oracle sdo_geometry types. Unfortunately, the manual setup process is a bit more complex for Oracle, as the CLR type that represents such a column is user-written and can use any name and assembly; MSSQL has a fixed type for that. You have to implement custom type converters in order to prepare the CLR types out of the query results.
I have attached a sample project that implements the CLR(i.e. SdoGeometry) types to represent the SDO_GEOMETRY / SDO_POINT_TYPE columns. The converters are implemented as well.
Please have a look at the example and get back to us in case you have further questions.
Ralph
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
0
Clyde Blaisdell
Top achievements
Rank 1
answered on 05 Mar 2014, 11:26 PM
Ralph,
I am using Telerik Version 2013.3.1211.3.
I looked at the example that you have listed and in the OracleCustomTypeConverter.cs file the comments say to add the section of xml code to the OpenAccess backend Configuration. Where and how is this done, do not see a specific file with that name and the .rlinq file is the only xml file related to the database objects. I don't see a good location in the rlinq file for the code.
Btw, I am using the Domain Model
Thank you
I am using Telerik Version 2013.3.1211.3.
I looked at the example that you have listed and in the OracleCustomTypeConverter.cs file the comments say to add the section of xml code to the OpenAccess backend Configuration. Where and how is this done, do not see a specific file with that name and the .rlinq file is the only xml file related to the database objects. I don't see a good location in the rlinq file for the code.
Btw, I am using the Domain Model
Thank you
0
Hi Clyde,
The comment block in the OracleCustomTypeConverter.cs does not apply to the mapping (FluentMapping) used in the example. If you look at the 'PrepareMapping ' method of the 'Setup' class in the Model.cs, you will see that the Fluent API is used to specify this converter for the SdoGeometry field.
Does the example not work for you?
Regards,
Ady
Telerik
The comment block in the OracleCustomTypeConverter.cs does not apply to the mapping (FluentMapping) used in the example. If you look at the 'PrepareMapping ' method of the 'Setup' class in the Model.cs, you will see that the Fluent API is used to specify this converter for the SdoGeometry field.
Does the example not work for you?
Regards,
Ady
Telerik
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
0
Clyde Blaisdell
Top achievements
Rank 1
answered on 07 Mar 2014, 03:58 PM
Ady,
I am using the Domain Model rather than the Fluent, so the example doesn't exactly translate. Do you have a example using the Domain Model?
Dana
I am using the Domain Model rather than the Fluent, so the example doesn't exactly translate. Do you have a example using the Domain Model?
Dana
0
Clyde Blaisdell
Top achievements
Rank 1
answered on 07 Mar 2014, 06:41 PM
Ady,
Couple more things, Fluent mapping API doesn't support Stored procedures. Also, I need the ability to update the model from the database this is why the Domain Model was chosen. If I customize the generated classes, then I will loose these changes every time I need to update the model from the database.
Couple more things, Fluent mapping API doesn't support Stored procedures. Also, I need the ability to update the model from the database this is why the Domain Model was chosen. If I customize the generated classes, then I will loose these changes every time I need to update the model from the database.
0
Hello Clyde,
Working with the Domain Model approach should not be any different. You can generate the model from the database and then you would need to select the property in the designer and change the data type of the generated field from 'object' to 'SdoGeometry'.
You will also need to specify the converter name for this field. This should be the FullName of the type that implements the converter. For example - 'ExampleConverter.OracleCustomTypeConverter'
This value can be set in the 'Model Schema Explorer'.
Do get back in case you need further assistance.
Regards,
Ady
Telerik
Working with the Domain Model approach should not be any different. You can generate the model from the database and then you would need to select the property in the designer and change the data type of the generated field from 'object' to 'SdoGeometry'.
You will also need to specify the converter name for this field. This should be the FullName of the type that implements the converter. For example - 'ExampleConverter.OracleCustomTypeConverter'
This value can be set in the 'Model Schema Explorer'.
Do get back in case you need further assistance.
Regards,
Ady
Telerik
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.