Hello,
I use a snakeyaml (java) based parser to write a test case, and couldn't figure out how to properly build the graph. Any help, highly appreciated. thanks.
RuntimeException occured : Cannot load fixture test-data.yml:
org.hibernate.PropertyAccessException: could not get a field value by
reflection getter of models.Priority.description
the above exception is for an unrelated field, and it works if I remove the association
roles:
- roleType: testRoleType
description: desc
If I change it to
- !models.Role
roleType: testRoleType
description: desc
RuntimeException occured : Cannot load fixture test-data.yml: null; Can't construct a java object for !models.Role; exception=onRole Any help, highly appreciated. thanks.
public class Person {
String fullname;
@OneToMany(cascade=CascadeType.ALL)
public List<Role> roles;
}
public class Role {
public RoleType roleType;
public String description;
}
public class RoleType {
public String roleName;
public String description;
}
YAML--
RoleType (testRoleType):
roleName: test
description: desc
Person(administrator):
fullname: Administrator
roles:
- roleType: testRoleType
description: desc