@MappedSuperclass
public abstract class BaseAbstract implements Serializable{
private static final long serialVersionUID = 1L;
protected String test =
public String getTest() {
return test;
}
public void setTest(String test){
this.test = test;
}
}
@Entity
public class Artist extends BaseAbstract
{
private static final long serialVersionUID = 1L;
private Integer id;
@override
@Transient
public String getTest() {
return test;
}
.....
}
My question is ... when I try to perform some operation on an artist, along with id and name, the test also gets a save, which should not be ...
If I add the same transition to the baseabstract class getTest () method, I see a NOT column that is not created (ideally, this should happen), but if I try to override the method with annotaion added to a subclass, it creates a test column .. .
I don’t know why this happens when hibernate creates an artist object and checks the annotations, it should see the temporary annotation present in the getTest () executor method ... and should not create a column in the database ...
Let me know if you need clarification ....
Any answer to this is much appreciated ....
thank