Test compilation failure with required relationship
murdos opened this issue · comments
Overview of the issue
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile (default-testCompile) on project jhipster: Compilation failure
[ERROR] /C:/dev/workspace/jhipster/tests/mn-mvn-jwt-angular/src/test/java/com/mycompany/myapp/web/rest/OperationResourceIT.java:[84,35] variable label might not have been initialized
Reproduce the error
Generate entities with a required
relationshipValidateRules.
Related issues
Suggest a Fix
Project configuration
Entity configuration(s) entityName.json
files generated in the .jhipster
directory
entity BankAccount {
name String required,
balance BigDecimal required
}
entity Label {
label String required minlength(3)
}
entity Operation {
date Instant required,
description String,
amount BigDecimal required
}
relationship OneToMany {
BankAccount{operation} to Operation{bankAccount(name)}
}
relationship ManyToOne {
BankAccount{user(login)} to User
}
relationship ManyToMany {
Operation{label(label) required} to Label{operation}
}
Browsers and Operating System
- Checking this box is mandatory (this is just to show you read everything)