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
When I try to use this findById function, I find myself with an empty AddressEntity in the address field. The only well-assigned field is the id (the others take their default values).
I did a little quick digging, and found out that it might be caused by the cache within the LcEntityReader.
When the project is first loaded during the execution of the query, it creates a first empty instance of the address and adds it to the cache. Then, when the fillLinkedEntities function is called for the joins, it finds the cached address and doesn't bother to read the query result to populate it.
Did I miss something in my setup or is it a bug?
PS: I had to add default values to the fields of AddressEntity because of the empty instance created during the query execution (I would get exceptions because of the null values). Is there any way to avoid that?
PPS: I saw in your wiki that default functions aren't supported in kotlin for the Spring Repositories. Actually, as I did, it is possible to add custom functions to a repository by using the compiler arg -Xjvm-default (and with the annotation @JvmDefault for older kotlin versions)
The text was updated successfully, but these errors were encountered:
Hi,
I have those two (simplified) entities with a one-to-one relationship:
And a repository:
When I try to use this
findById
function, I find myself with an emptyAddressEntity
in theaddress
field. The only well-assigned field is the id (the others take their default values).I did a little quick digging, and found out that it might be caused by the cache within the
LcEntityReader
.When the project is first loaded during the execution of the query, it creates a first empty instance of the address and adds it to the cache. Then, when the
fillLinkedEntities
function is called for the joins, it finds the cached address and doesn't bother to read the query result to populate it.Did I miss something in my setup or is it a bug?
PS: I had to add default values to the fields of
AddressEntity
because of the empty instance created during the query execution (I would get exceptions because of the null values). Is there any way to avoid that?PPS: I saw in your wiki that default functions aren't supported in kotlin for the Spring Repositories. Actually, as I did, it is possible to add custom functions to a repository by using the compiler arg
-Xjvm-default
(and with the annotation@JvmDefault
for older kotlin versions)The text was updated successfully, but these errors were encountered: