Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type missmatch int <-> double #828

Open
EvsenevDev opened this issue May 21, 2024 · 0 comments
Open

type missmatch int <-> double #828

EvsenevDev opened this issue May 21, 2024 · 0 comments

Comments

@EvsenevDev
Copy link

I have model with these fields:

final double price;
final double tax;

@ColumnInfo(name: 'exchange_rate')
final double exchangeRate;

And these columns in database:

Screenshot 2024-05-20 at 10 58 08 PM

generated code:
price: row['price'] as double

Issue:
type 'int' is not a subtype of type 'double' in type cast

I'm guessing sometimes in mappper recognizes it as int sometimes as double.

Is it possible to map it as I need?
Maybe converter where I can get Object? as input and map by myself?
I've tried to use String converter, but it's using as String instead of toString() which works fine.

Any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant