You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Entity Foo has @Embedded object Bar. Foo gets inserted via CrudRepository with one of the fields of Bar being null.
When retrieving Foo from Repository, @embeddable object Bar should be retrieved as inserted.
Actual Behaviour
When one of the fields of Bar is null the whole embedded object Bar is retrieved as null from the Repository.
Tracked down the error to SqlResultEntityTypeMapper:464 in micronaut-data-runtime:3.2.0.
Here null gets returned if column value is null and persistentEntity (Bar) has Annotation Embeddable.
The text was updated successfully, but these errors were encountered:
bas001
changed the title
Entity with @Embedded object can't be retrieved when having @Nullable fields
@Embeddable object can't be retrieved when having @Nullable fields
Dec 14, 2021
Expected Behavior
Entity Foo has @Embedded object Bar. Foo gets inserted via CrudRepository with one of the fields of Bar being null.
When retrieving Foo from Repository, @embeddable object Bar should be retrieved as inserted.
Actual Behaviour
When one of the fields of Bar is null the whole embedded object Bar is retrieved as null from the Repository.
Tracked down the error to SqlResultEntityTypeMapper:464 in micronaut-data-runtime:3.2.0.
Here null gets returned if column value is null and persistentEntity (Bar) has Annotation Embeddable.
Steps To Reproduce
Execute test EmbeddedTest in Example Application.
Environment Information
JDK 11
Micronaut 3.2.1 (Same behavior observed in Micronaut 2.5.12)
micronaut-data 3.2.0
micronaut-data-jdbc 3.2.0
Example Application
https://github.com/bas001/micronaut-data-embedded
Version
3.2.1
The text was updated successfully, but these errors were encountered: