I have forked an Atlassian Stash plugin for build server integration, and it uses the ActiveObjects component for storing the data. I'm having the following issue:
If I follow the other fields and add a getter and setter for my OneToMany fields like this
@OneToMany
TestMapping[] getTestMapping();
void setTestMapping(TestMapping[] powerMappings);
When using the entity I get the following exception:
[INFO] [talledLocalContainer] Caused by: java.lang.RuntimeException: Unrecognized type: [Lsome.package.TestMapping;
[INFO] [talledLocalContainer] at net.java.ao.types.TypeManager.getType(TypeManager.java:68) ~[na:na]
[INFO] [talledLocalContainer] at net.java.ao.schema.SchemaGenerator.getSQLTypeFromMethod(SchemaGenerator.java:481) ~[na:na]
Googling for the issue only found the solution to remove the setter like suggested in this post. However, that takes away the possibility to set the field if a configuration already exists. I don't think deleting an ActiveObject and saving a new one is the way to go here.
How to fix this issue? Or if it is not possible, how to update an existing object without using setters in ActiveObjects?