-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Use @SerializableField
properties in Query.parseRow
#98
Labels
bug
Something isn't working
Comments
BenVercammen
added a commit
to BenVercammen/angel
that referenced
this issue
Mar 21, 2023
BenVercammen
added a commit
to BenVercammen/angel
that referenced
this issue
Mar 21, 2023
BenVercammen
added a commit
to BenVercammen/angel
that referenced
this issue
Mar 21, 2023
I can see use cases for custom serialization. Good feature to have. |
BenVercammen
added a commit
to BenVercammen/angel
that referenced
this issue
Mar 22, 2023
… `Query.parseRow` (dart-backend#98)
BenVercammen
added a commit
to BenVercammen/angel
that referenced
this issue
Mar 22, 2023
A couple of points to note:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider the following classes:
Currently, the generated
HasCarQuery
class will have aparseRow
method that looks something like this:The generated
HasCarSerializer
will (de)serialize using the definedcolorToCode(model.color)
andcodeToColor(map['color'])
methods. This results in the value being persisted in the databse as aString
, but since the enum handler just assumes that the indeces are being persisted, it will try to read that value as anint
, resulting in a type cast exception.Therefore, I'd like to propose that the
OrmGenerator
will also take the following@SerializableField
properties into account:serializer
deserializer
serializesTo
Any thoughts on this? I'll submit a PR as soon as possible...
The text was updated successfully, but these errors were encountered: