Skip to content

Commit

Permalink
fix with jdl
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelo Manganiello committed Dec 29, 2020
1 parent eb48e5b commit 7815633
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<a name="1.4.1"></a>
<a name="1.4.0"></a>
<a name="1.3.0"></a>
<a name="1.2.0"></a>
Expand All @@ -11,6 +12,10 @@
<a name="1.0.0-alpha.3"></a>
<a name="1.0.0-alpha.2"></a>

# [1.4.1](https://github.com/jhipster/generator-jhipster-nodejs/tree/v1.4.1) - xx/xx/2021 released date

- A relation OneToOne from a custom entity to the User entity together other OneToMany relationships throw an error [issue #195](https://github.com/jhipster/generator-jhipster-nodejs/issues/195)

# [1.4.0](https://github.com/jhipster/generator-jhipster-nodejs/tree/v1.4.0) - 14/12/2020 released date

- Add validation in dto nestjs controllers [issue #182](https://github.com/jhipster/generator-jhipster-nodejs/issues/182)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export class <%= asEntity(entityClass) %> extends BaseEntity {
const relationshipRequired = relationships[idx].relationshipRequired;
const otherEntityNameCapitalized = relationships[idx].otherEntityNameCapitalized;
const ownerSide = relationships[idx].ownerSide;
isUserRelationship = isUserRelationship && relationship.otherEntityAngularName === 'User';
if (relationshipType === 'one-to-many') {_%>
@OneToMany(type => <%= relationship.otherEntityAngularName %> <%_ if (isUserRelationship === false) { _%>, other => other.<%= otherEntityRelationshipName %><%_ } _%>)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,14 @@ entity ShopUser {
}

relationship OneToOne {
ShopUser{shop} to User
ShopUser{internalUser} to User
}

relationship OneToMany {
Customer{wishList(title)} to WishList{customer},
WishList{product(title)} to Product{wishList},
Customer{address} to Address{customer}
Customer{address} to Address{customer},
ShopUser{products} to Product
}

relationship ManyToOne {
Expand Down

0 comments on commit 7815633

Please sign in to comment.