Christian Strebel
Let say I have
Class testSuper:
id
name
I want this class contain common fields that should contain in all my classes -----create_time, disabled
Since Axon Ivy dosen't support polymorphism of entity class , I wrote my own entity class (Just directly copy from src_dataClass but it extends my own class)
TestSuper:
package entity;
import superClass.superClass;;
@SuppressWarnings("all")
@javax.annotation.processing.Generated(comments="This is the java file of the ivy data class testSuper", value={"ch.ivyteam.ivy.scripting.streamInOut.IvyScriptJavaClassBuilder"})
@javax.persistence.Entity
@javax.persistence.Table(name="testSuper")
public class TestSuper extends superClass
{
private static final long serialVersionUID = 7728455742610105018L;
@javax.persistence.Id
@javax.persistence.GeneratedValue
private java.lang.Integer id;
public java.lang.Integer getId()
{
return id;
}
public void setId(java.lang.Integer _id)
{
id = _id;
}
private java.lang.String name;
public java.lang.String getName()
{
return name;
}
public void setName(java.lang.String _name)
{
name = _name;
}
}
superClass:
package superClass;
import ch.ivyteam.ivy.scripting.objects.DateTime;
public class superClass extends ch.ivyteam.ivy.scripting.objects.CompositeObject{
private DateTime create_time = new DateTime();
private boolean disabled = false;
public DateTime getCreate_time() {
return create_time;
}
public void setCreate_time(DateTime create_time) {
this.create_time = create_time;
}
public boolean isDisabled() {
return disabled;
}
public void setDisabled(boolean disabled) {
this.disabled = disabled;
}
}
But when I go to Defination -> Persistence -> Generate Shema, I can't see the create_time and disabled fields being created. Then, I try to add this schema manually. After that, jpa indeed success to insert new row to my DB but the create_time and disabled fields remain empty.
Thank you for your time.