This is a migrated thread and some comments may be shown as answers.

Design Error when change type

1 Answer 33 Views
Design Time (Visual Designer & Tools)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Israel Castillo Hernandez
Top achievements
Rank 1
Israel Castillo Hernandez asked on 25 Jul 2012, 10:18 PM
I think i found a bug. I create a DomainClass with a property ModeloID (type CHAR) then I use default mapping, days later I change "ModeloID" to INT16 type and I change the mapping type to smallint, in design mode everything looks ok but if i run the application, it throw an error "The metadata for field 'modeloID' of class 'PerforacionBajoBalance.Model.CondicionesQL' cannot be initialized: Type converter initialization failed. The converter with name 'OpenAccessRuntime.Data.CharConverter' does not convert from CLR type 'System.Int16' to SQL type 'smallint'."

I open the rlinq file qith the notepad and it looks that ADO-TYPE is still CHARACTER and CharConverter

<orm:field name="modeloID" property="ModeloID" uniqueId="c1227ae6-13d3-47b3-83db-96a1191e7847" type="System.Int16">
          <orm:column name="ModeloID" sql-type="smallint" nullable="false" length="0" scale="0" primary-key="true" converter="OpenAccessRuntime.Data.CharConverter" ado-type="Character" />

1 Answer, 1 is accepted

Sort by
0
Ady
Telerik team
answered on 30 Jul 2012, 02:02 PM
Hello Israel,

Yes this seems to be a case that is not handled well. We will fix things there. You can remove the ADO type and converter from the rlinq file. OpenAccess calculates a default SQL type from the CLR type and a default converter to convert between these types.
So at the minimum you need only the CLR type but if the sql type is there you can keep it. You should remove the converter and ADO type.

Do get back in case you need further assistance.

Kind regards,
Ady
the Telerik team
OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
Tags
Design Time (Visual Designer & Tools)
Asked by
Israel Castillo Hernandez
Top achievements
Rank 1
Answers by
Ady
Telerik team
Share this question
or