Hi,
I've got a little problem with a mapping.
Ideally, I would have this :
Code:
public class Operator {
// id, etc ...
private List<Operator> destinations;
}
so it would be easy.
But of course I wouldn't ask my question here if it was that easy :)
The problem is that I need additional infos about these "destinations", like a status and a datetime.
So it would end up as two different classes :
Code:
public class Operator {
//...
List<Destination> destinations;
}
public class Destination {
//...
private Operator destinationOperator;
private DestinationStatus status;
private Date activeDate;
}
My problem is, how can I map this beast correctly ?
I've tried several solutions (Destination being either @Embedded or @Entity) but there are always flaws in the mapping.
I know I'm doing it wrong because it's not so uncommon, so it should exist a simple solution, no ?