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

Extending SimpleJpaRepository (fixing problems in JPA spec) #3

Closed
bjconlan opened this issue Apr 6, 2011 · 2 comments
Closed

Extending SimpleJpaRepository (fixing problems in JPA spec) #3

bjconlan opened this issue Apr 6, 2011 · 2 comments
Assignees
Labels
status: invalid An issue that we don't feel is valid

Comments

@bjconlan
Copy link

bjconlan commented Apr 6, 2011

I'm currently implementing a CascadeBulkDeleteJPARepostory to rectify a problem we are having with bulk deletes not removing @EmbeddedCollections. This is a well known problem (see http://stackoverflow.com/questions/3903202/how-to-do-bulk-delete-in-jpa-when-using-element-collections) and am overwriting the SimpleJPARepository to fix such a problem (temporarily just by performing deleteAll(Collection) at this stage). But I would find it beneficial to have access to the variables set by the constructor (at least in 1.0.0.M2).

Now obviously I currently maintain a reference to the objects in my implementation but providing a:

EntityManger getEntityManager()
and
JpaEntityInformation<T, ID> getEntityMetadata()

in the SimpleJPARepostory would be quite useful for such cases.

Thanks & great work.

@bjconlan
Copy link
Author

bjconlan commented Apr 6, 2011

'just by performing deleteAll(Collection)' that should be: I'm using the existing 'SimpleJPARepository.delete(Iteratable) inside the overriden deleteAll method.' It's hardly a pretty solution but I plan on parsing entity meta data at a later date.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 4, 2021
@gregturn gregturn added status: invalid An issue that we don't feel is valid and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 19, 2022
@gregturn
Copy link
Contributor

This appears to be a JPA-specific issue which is currently NOT SUPPORTED (read the updated comments on the linked SO response).

However, according to https://hibernate.atlassian.net/browse/HHH-5529, this has been has been added to Hibernate 6. However, there are a multitude of issues that bar us from adopting HIbernate 6 at this point in time.

Please feel free to revisit whenever you are able to adopt Hibernate 6 and see if this issue is still a problem.

@gregturn gregturn self-assigned this Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

3 participants