This may be very basic but I was not sure how to achieve this. Let us say you have a type called Change and your need is to track old vs new change.
So lets say you want to have 2 picker boxes. One will allow you to choose and set the old user and another will let you choose a new user.
All the examples and documentation is see about association and composition I always see that it will end up allowing a list or set of related types. And if I declare 2 properties and both of them have to point to a User type, it gives error. What am I missing?
Any quick help will be appreciated.
Thanks Konstantin. I thought, to use another class in the current class we need to use association or composition by default. Please correct my understanding.
Here is a sample of what I am trying. @Column(name = “PREVIOUS_OS”)
protected OS previousOS;
@Column(name = "CURRENT_OS")
protected OS currentOS;
Error I get:
Entity class must use a @JoinColumn instead of @Column to map its relationship attribute [previousOS].
Actually Konstantin, while discussing with you, I realized one more fundamental mistake I was doing, and correcting it solved my problem. So thank you.