1. Roland Mühlberger
  2. SnapObjects
  3. Friday, 19 July 2019 10:19 AM UTC

Hi,

we are in the process of building a Web API with SnapObjects. In PowerBuilder, we support either Sql Server or Oracle with the same table structure.

For number columns we use "int" in Sql Server and "number(38)" in Oracle. Unfortunately that leads to the following error when using SnapDevelop:

System.InvalidOperationException: Data type of mapped property on model is not compatiable, property: MZE
   at SnapObjects.Data.DataModelBinding.BindModel(IList`1 columnSchema, IPocoModelMeta modelMeta, ITypeMapper mapper)

Is there any way we can influence the binding process?

Thanks,

Roland

 

Roland Mühlberger Accepted Answer Pending Moderation
  1. Friday, 15 November 2019 16:27 PM UTC
  2. SnapObjects
  3. # 1

Dear Logan,

any plans to let us influence the binding process in some way?

Right now we are forced to have two different source codes an two different binary as well!

Where can I post a proposal? I am sure we are not the only ones that are affected.

Regards,

Roland

Comment
  1. Chris Pollach @Appeon
  2. Friday, 15 November 2019 20:37 PM UTC
Hi Roland;

Please open a Support Ticket and mark it as an enhancement request for this feature.

Regards ... Chris
  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Friday, 19 July 2019 13:13 PM UTC
  2. SnapObjects
  3. # 2

since version 11, oracle has an int data type that is the same size as sql server int.  so it is at least an option to write conversion scripts to int if the binding process can't be changed.

Comment
  1. Logan Liu @Appeon
  2. Monday, 22 July 2019 10:36 AM UTC
Hi Roland,

There is no way to influence the binding process now.



If you don't want to modify the database, you can create another model using C# datatype decimal for Oracle number(38). But it's not easy to maintain code in this way.



Regards,

Logan
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.