I use the snakeyaml parser (java) to write a test case and cannot figure out how to plot the graph correctly. Any help greatly appreciated. thank.
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 applies to 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: Failed to load test-data.yml: null; Unable to build java object for! Models.Role; Exception = onRole Any help highly appreciated. Thank you
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
source
share