Entity A: Person, Entity B: Payment (columns: effectiveDate, fromPerson, toPerson). Person should be one to many with both fromPerson and to Person so that I can track payer and payee.
This is how I have defined them in jdl file which is not working as desired.
entity Person {
firstName String maxlength(100)
lastName String maxlength(100)
}
entity Payment{
effectiveDate Instant
paymentRefNumber String
amount Double
}
relationship OneToMany {
Person to Payment{fromParty}
Person to Payment{toParty}
}
When I generate code with this jdl file, I am getting error in person pojos where the relationships are defined twice and when I rectify them, application is taking too long to start about 30 mins
Any idea where I am going wrong?
My jdl file configuration:
application {
config {
databaseType sql
devDatabaseType postgresql
enableHibernateCache true
enableSwaggerCodegen false
enableTranslation true
jhiPrefix sys
languages [en, bn, hi, mr, ta, te]
nativeLanguage en
packageName com.eezibizi
prodDatabaseType postgresql
serviceDiscoveryType false
skipClient false
skipServer false
testFrameworks [gatling, cucumber, protractor]
websocket spring-websocket
applicationType monolith
baseName eezibizi
serverPort 8080
authenticationType session
cacheProvider hazelcast
buildTool gradle
useSass true
clientPackageManager npm
clientFramework react
}
entities *
}
If there is a better approach, please suggest