Design Error when change type

Thread is closed for posting
2 posts, 0 answers
  1. Israel Castillo Hernandez
    Israel Castillo Hernandez  avatar
    1 posts
    Member since:
    Dec 2005

    Posted 25 Jul 2012 Link to this post

    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" />
  2. Ady
    Ady avatar
    589 posts

    Posted 30 Jul 2012 Link to this post

    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,
    the Telerik team
    OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
Back to Top