Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using hibernate and spring boot the HibernateUnproxyObjectAccessHook does not cover all scenarios #565

Closed
dwtalk opened this issue Jul 12, 2017 · 3 comments
Labels

Comments

@dwtalk
Copy link
Contributor

dwtalk commented Jul 12, 2017

The implementation of HibernateUnproxyObjectAccessHook and how it plugs into the GlobalIdFactory's create method covers most scenarios.

However, I did find an scenario where when a Query is build and run byInstance, the instance ID of the hibernate proxy is assumed and not the id of the desired object (which is proxied).

Specifically the error I was seeing is: "ENTITY_INSTANCE_WITH_NULL_ID" which will be resolved with a pull request momentarily.

I was able to correct the issue using the ObjectAccessHook in the createInstanceId method of the GlobalIDFactory just as it is used in the create method.

dwtalk added a commit to dwtalk/javers that referenced this issue Jul 12, 2017
@dwtalk
Copy link
Contributor Author

dwtalk commented Jul 12, 2017

Pull request created for this 1 line fix

#566

@bartoszwalacik
Copy link
Member

Thanks, PR merged, will be released tomorrow

@bartoszwalacik
Copy link
Member

released in 3.3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants