Yeah, you can't just do a collection of strings. You will need to create a wrapper class with a String
field in it as well as a foreign Parameters
field:
public class Language {
@DatabaseField(generatedId = true)
int id;
@DatabaseField
String language;
@DatabaseField(foreign = true)
Parameters parameters;
}
Here's the description of foreign collections from the FM. To quote:
Remember that when you have a ForeignCollection field, the class in the collection must (in this example Order) must have a foreign field for the class that has the collection (in this example Account). If Account has a foreign collection of Orders, then Order must have an Account foreign field. It is required so ORMLite can find the orders that match a particular account.