j256 / ormlite-core

Core ORMLite functionality that provides a lite Java ORM in conjunction with ormlite-jdbc or ormlite-android
http://ormlite.com/
ISC License
577 stars 212 forks source link

DataType.FLOAT_OBJ not working #277

Closed PiotrWojciechowski-dev closed 1 year ago

PiotrWojciechowski-dev commented 1 year ago

Hi,

I'm trying to retrieve a float number from my database, but I'd like to map that data to a Float object rather than the primitive type. @DatabaseField(dataType = DataType.FLOAT_OBJ, columnName = "number") private Float number;

If I leave it like it was before then it works fine but I can't test for null etc. @DatabaseField(columnName = "number") private float number;

j256 commented 1 year ago

What is the failure mode @PiotrWojciechowski-dev ? What sort of error or problem do you get? Can you write up a unit test case with a small object and some data?

PiotrWojciechowski-dev commented 1 year ago

Error was actually involved with a foreign table not updating, even though the error was pointing to that column. Once I fixed it the object fields had the correct data.