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

Add saveWithReferenceTo[Field] DSL support for linking using EntityManager.getReference [DATAJPA-422] #829

spring-projects-issues opened this issue Oct 31, 2013 · 1 comment
status: declined type: enhancement


Copy link

@spring-projects-issues spring-projects-issues commented Oct 31, 2013

Neale Upstone opened DATAJPA-422 and commented

Instead of exposing EntityManager.getReference() as suggested in DATAJPA-83, we could provide DSL save() implementations that support saveWithReferenceTo[fieldName](entity, referenceId).

For example:

class Foo {
    private Bar bar;

    // etc

interface FooRepository extends CrudRepository<Foo, Long> {

    Foo saveWithReferenceToBar(Foo entity, Long barId);

My implementation to achieve this is at

No further details from DATAJPA-422

Copy link

@spring-projects-issues spring-projects-issues commented Oct 18, 2019

Jens Schauder commented

This is a rather special requirement and I don't think this would find the necessary amount of usage to make it worthwhile

@spring-projects-issues spring-projects-issues added status: declined type: enhancement labels Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
status: declined type: enhancement
None yet

No branches or pull requests

2 participants