- Peter Kurz
- SnapObjects
- Friday, 14 August 2020 01:15 PM UTC
Hello,
is there a way to influence the binding process between SnapObjects and a database (specifically Oracle) yet?
The issue we're facing is that when reading from an Column that has the type NUMBER, SnapObjects requires the property in the C# Model to be a decimal, which doesn't make a lot of sense if the property/column in question is for example an ID.
This feature has already been asked for in late 2019 (https://community.appeon.com/index.php/qna/q-a/different-binding-for-oracle-and-sql-server-number-columns), so I was wondering if this is possible yet.
If not, is there any other way to resolve this? I've tried to create a struct that allows for casting between decimal and int, but SnapObjects doesn't seem to care about whether or not the assignment would be possible, it's just looking for the decimal type and won't accept anything else. Creating an entirely different model just for Oracle would be very unwieldy and hard to maintain.
Kind regards,
Peter
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.