}
((ManyToOneAttribute) attribute).setValue(value);
}
public void addOneToManyValue(String name, AssociationValue value) {
Attribute attribute = getAttributes().get(name);
if (!(attribute instanceof OneToManyAttribute)) {
throw new IllegalStateException("Cannot set oneToMany value on attribute with different type, " +
attribute.getClass().getName() + " setting value " + value);
}
OneToManyAttribute oneToMany = (OneToManyAttribute) attribute;
if (oneToMany.getValue() == null) {
oneToMany.setValue(new ArrayList<AssociationValue>());
}