Provide support to increase developer productivity in Java when using Reactive Relational Database Connectivity. Uses familiar Spring concepts such as a DatabaseClient for core API usage and lightweight repository style data access.
Apache License 2.0
708
stars
132
forks
source link
Custom converter in R2dbcEntityOperations breaks nested mappings #850
I'm using the MySQL Sakilla DB (a sample database they provide). My resulting JSON looks like:
{
"filmId": 1,
"title": "Academy Dinosaur",
"description": "An epic drama of a feminist and a mad scientist who must battle a teacher in the canadian rockies",
"releaseYear": 2006,
"rating": "PG",
"actors": [
{
"firstName": "Penelope",
"lastName": "Guiness"
}
]
}
I'm connecting to multiple DBs, so I use R2dbcEntityOperations. I need to do some mapping on the rating field, so I added a custom converter. Now the resulting JSON is:
{
"filmId": 1,
"title": "Academy Dinosaur",
"description": "An epic drama of a feminist and a mad scientist who must battle a teacher in the canadian rockies",
"releaseYear": 2006,
"rating": "PG",
"actors": []
}
I'm using the MySQL Sakilla DB (a sample database they provide). My resulting JSON looks like:
I'm connecting to multiple DBs, so I use R2dbcEntityOperations. I need to do some mapping on the rating field, so I added a custom converter. Now the resulting JSON is:
My code looks like this: