Good for this, but now, how to implement the fourth class containing List<AbstractPerson>
in this example?
I clarify my question:
public class ClassRoom { @ForeignCollectionField(foreignFieldName="asYouWant") public Collection<Person> peoples; } peoples.add(new Student()); peoples.add(new Teacher()); peoples.add(new Student());
because when ormlite tries to access people like:
for (Person person : classRoom.peoples) { if (person.getType() == Student) //do stuff else if (person.getType() == Student) //do other stuff }
He will not be able to get personDAO because he does not exist (annotation) ... I get all my database functions with a good identifier and attitude, is it just a data access issue?
source share