Relationship in Jhipster with cascade removing (JDL)
up vote
0
down vote
favorite
I want to create relationship between two entities - for example Directory and File. Its really similiar to example from JDL JHipster. Directory have 0, one or more files. And one file has only one directory. But in this case, I want to store in File entity external ID to Directory entity.
In addition, when I delete Directory, I want to delete all files related to this directory.
Do you have any ideas how to achieve this in JDL?
I have tried to make ManyToOne relationship, but I had problems with cascade removing.
hibernate jhipster
add a comment |
up vote
0
down vote
favorite
I want to create relationship between two entities - for example Directory and File. Its really similiar to example from JDL JHipster. Directory have 0, one or more files. And one file has only one directory. But in this case, I want to store in File entity external ID to Directory entity.
In addition, when I delete Directory, I want to delete all files related to this directory.
Do you have any ideas how to achieve this in JDL?
I have tried to make ManyToOne relationship, but I had problems with cascade removing.
hibernate jhipster
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I want to create relationship between two entities - for example Directory and File. Its really similiar to example from JDL JHipster. Directory have 0, one or more files. And one file has only one directory. But in this case, I want to store in File entity external ID to Directory entity.
In addition, when I delete Directory, I want to delete all files related to this directory.
Do you have any ideas how to achieve this in JDL?
I have tried to make ManyToOne relationship, but I had problems with cascade removing.
hibernate jhipster
I want to create relationship between two entities - for example Directory and File. Its really similiar to example from JDL JHipster. Directory have 0, one or more files. And one file has only one directory. But in this case, I want to store in File entity external ID to Directory entity.
In addition, when I delete Directory, I want to delete all files related to this directory.
Do you have any ideas how to achieve this in JDL?
I have tried to make ManyToOne relationship, but I had problems with cascade removing.
hibernate jhipster
hibernate jhipster
edited 22 hours ago
Billy Frost
1,72788
1,72788
asked yesterday
Greggy
951111
951111
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
JHipster does not generate any cascading rules for entities because they depend on your business requirements which are unknown to the generator. So JDL cannot help here, you have to code it manually.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
JHipster does not generate any cascading rules for entities because they depend on your business requirements which are unknown to the generator. So JDL cannot help here, you have to code it manually.
add a comment |
up vote
0
down vote
JHipster does not generate any cascading rules for entities because they depend on your business requirements which are unknown to the generator. So JDL cannot help here, you have to code it manually.
add a comment |
up vote
0
down vote
up vote
0
down vote
JHipster does not generate any cascading rules for entities because they depend on your business requirements which are unknown to the generator. So JDL cannot help here, you have to code it manually.
JHipster does not generate any cascading rules for entities because they depend on your business requirements which are unknown to the generator. So JDL cannot help here, you have to code it manually.
answered yesterday
Gaël Marziou
9,40222432
9,40222432
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53417121%2frelationship-in-jhipster-with-cascade-removing-jdl%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown