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
Experiencing an odd bug rendering a JSON list as part of a Rest API.
I am finding if the list of DO's contains a proxy object as the first item of a list, the view renders it as 'null' other proxy objects are rendered as expected.
If the first item is not a proxy, then all objects are rendered as expected.
My workaround is to do something like this:
if (items.size() > 0) {
items[0] = GrailsHibernateUtil.unwrapIfProxy(items[0]) as DO)
}
But this doesn't seem like a great or scalable solution.
Grails 4.0.13 Views-json 2.0.4
The text was updated successfully, but these errors were encountered:
I have also noticed that the automatic de-proxying is not always accurate. For example if item 8 of a list of ten is proxied, then it will be populated with the contents of item 7.
This has let me to deproxy the entire list always which feels like something the framework should take care of.
Experiencing an odd bug rendering a JSON list as part of a Rest API.
I am finding if the list of DO's contains a proxy object as the first item of a list, the view renders it as 'null' other proxy objects are rendered as expected.
If the first item is not a proxy, then all objects are rendered as expected.
My workaround is to do something like this:
if (items.size() > 0) {
items[0] = GrailsHibernateUtil.unwrapIfProxy(items[0]) as DO)
}
But this doesn't seem like a great or scalable solution.
Grails 4.0.13 Views-json 2.0.4
The text was updated successfully, but these errors were encountered: