-
Notifications
You must be signed in to change notification settings - Fork 82
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
Problem with jdl relationships between default User jhipster entity #110
Comments
Hi @Zahma thanks for the feedback!
However, I will try to resolve it with a good workaround. Thank you a lot! |
Thank you, In fact the relationship points towards Users and not the opposite . So normally the relationship should be kept. Otherwise, do you know of a good idea to extend user entity ? In Jhipster we used to add the "mappedBy" in the user domain. |
The JDL is okay (except I don't get the two relationships, but I guess it's just an over-simplified sample). |
Maybe I have resolved this in: https://github.com/jhipster/generator-jhipster-nodejs/tree/bug/110 You can download and link locally that for testing. For me it works. Thanks a lot |
Yes, I have fixed it. |
I'll try and let you know ;) |
Sweet, thanks! |
I have retested it. So, in order to release, I consider this close. If you have other request please open a new issue. Thanks |
Describe the bug
Generated code is not running because of one to one relationship with the entity user I guess.
To Reproduce
entity ExtendOne {
}
entity ExtendTwo {
}
relationship OneToOne {
ExtendOne{user(login) required} to User,
ExtendTwo{user(login) required} to User,
}
Expected behavior
Getting the following error:
` return new TSError(diagnosticText, diagnosticCodes)
^
TSError: ⨯ Unable to compile TypeScript:
src/domain/extendOnet.entity.ts:6:8 - error TS1192: Module '"D:/dev/Projet_Mehdi/S/server/src/domain/user.entity"' has no default export.
6 import User from './user.entity';
~~~~
src/domain/extend-one.entity.ts:55:20 - error TS2339: Property 'extendOne' does not exist on type '{}'.
55 other => other.extendOne`
The text was updated successfully, but these errors were encountered: