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

Remove reference to other entities in an embedded entity #11933

Merged
merged 1 commit into from Jun 15, 2020

Conversation

murdos
Copy link
Contributor

@murdos murdos commented Jun 14, 2020

Unless the other entity is also an embedded one: then the ownerside should be taken into account

This was one of my comment on the original PR: #11239 (comment)
And this also cause issues when using both ElasticSearch and MongoDB in Spring Boot 2.3

An illustration, with the following JDL:

entity DocumentBankAccount

@embedded
entity EmbeddedOperation

relationship OneToMany {
  DocumentBankAccount to EmbeddedOperation
}

Before

public class DocumentBankAccount implements Serializable {
    @Field("embeddedOperation")
    private Set<EmbeddedOperation> embeddedOperations = new HashSet<>();
}

public class EmbeddedOperation implements Serializable {
    @DBRef
    private DocumentBankAccount documentBankAccount;
}

After

public class DocumentBankAccount implements Serializable {
    @Field("embeddedOperation")
    private Set<EmbeddedOperation> embeddedOperations = new HashSet<>();
}

public class EmbeddedOperation implements Serializable {
}

Unless the other entity is also an embedded one: then the ownerside should be taken into account
@murdos murdos force-pushed the remove-entity-ref-in-embedded-entity branch from 4d42521 to 66ad08a Compare June 14, 2020 10:36
Copy link
Member

@DanielFran DanielFran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@murdos murdos merged commit a6c3bf7 into jhipster:master Jun 15, 2020
@murdos murdos deleted the remove-entity-ref-in-embedded-entity branch June 15, 2020 19:04
@pascalgrimaud pascalgrimaud added this to the 6.10.0 milestone Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants