micronaut-data
micronaut-data copied to clipboard
Properties annotated with JPA transient should not be excluded from introspections by default
…ntrospections by default
This fixes the consequences from https://github.com/micronaut-projects/micronaut-core/pull/8072 and was done following https://github.com/micronaut-projects/micronaut-core/discussions/8052
Determining the persistent properties by filtering by the introspection properties that do not have the Transient annotation.
We would need to filter out transient properties somehow. Maybe there can be a new method isTransient.
Actually, after looking at the code for a bit, it was already there... When the code cycles through the bean properties it already has a check to continue if the property is transient.
example: https://github.com/micronaut-projects/micronaut-data/blob/master/data-model/src/main/java/io/micronaut/data/model/runtime/RuntimePersistentEntity.java#L83-L85
All in all I found 3 locations where this would make a difference and they all seemed to already have a check to ignore Transient properties.
@dstepanov I've been using the version built from this commit (in conjunction with the change on micronaut-core) for about a week now and it seems to work fine with jdbc & hibernate. I have had issues with the @Transactional support (in data-tx) but it doesn't seem related to these changes (the logs seem to indicate a recursive bean injection issue).
Not sure if you've had a chance to take any meaningful look at this but I also have no clue why the checks are failing here since they seem to run fine on my local environment. The logs on github actions shows the following error ##[error]❌ Failed to create checks using the provided token. (HttpError: Resource not accessible by integration).
In any case, to wrap up this already long message, is there anything I can do to help you out here?
@graemerocher, @dstepanov
It seems you're getting ready to release version 4.0. Can we please get a resolution on this?
Thanks!
Can you please rebase the PR?
Hi @dstepanov, just rebased to master. Sorry I thought this project was using the same approach as Micronaut-core but from the other PRs I gather that you actually want to merge to master instead of 4.0.x. I've rebased to master and changed the PR base to master.
Let me know if this is not what you intended and I'll fix it ASAP (I am on CET time)
I have corrected and added more tests.