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

BaseEntity and (hibernate) proxies #67

Open
javier-godoy opened this issue Nov 15, 2022 · 2 comments
Open

BaseEntity and (hibernate) proxies #67

javier-godoy opened this issue Nov 15, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@javier-godoy
Copy link
Member

The implementation of equals in BaseEntity is such that an entity is not equals to its proxy:

https://github.com/AppJars/commons-backend/blob/ca5a44fea72cec4a41f3b5c240bd8da590a43b0c/commons-model/src/main/java/com/appjars/saturn/model/Identifiables.java#L66-L70

See https://stackoverflow.com/q/11013138/1297272

@mlopezFC mlopezFC added the bug Something isn't working label Feb 15, 2023
@mlopezFC
Copy link
Member

I tried to implement it, but I have this:
image
Any ideas?

@mlopezFC mlopezFC self-assigned this Jun 25, 2024
@javier-godoy
Copy link
Member Author

I think you want b.isAssignableFrom(a) . instanceof requires a compile-time class literal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants