I m using jhipster v2. I have two entities (Father, Daughter), Father has a One-To-Many relationship with Daughter, and Daughter has a many-to-one relationship with Father. I have just made one modification to the generated java code :
- I have configured the fetch type of the relationship between Father and Daughter to EAGER.
When I am getting all the Fathers, on the Java side I can see the Daughters collections attached to the Fathers, but I can't see the collection on the client(Anglarjs) side, Father javascript object doesn't have a 'daughters' property.
Is it normal? On server side :
@Entity
@Table(name = "T_CLIENT")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Client implements Serializable {
...
@OneToMany(mappedBy = "client", fetch = FetchType.EAGER)
@JsonIgnore
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
private Set<Adresse> adresses = new HashSet<>();
@OneToOne
private Langue langue;
...
}
Client side (in my angularjs controller):
$scope.clients = Client.query(function(){
$log.info($scope.clients);
});
On client side I can see 'langue' property of client, but there is no 'adresses' property in client. I don't understand why.
Thanks for your answers.