I have the inheritance to do below and I would like to know how it would look on main. Could someone here help?
Could you tell me if you have problems with the mapping I did and what would the mainTest look like? I can not set the value of the classLancamentoDespesaParcelado ...
Iuse:1ºtheEclipse;2ndOracledatabaseandtoviewthetablesofthedatabaseIuseoracleSQLDeveloper;
3ºAndintheprojectwewillusethestrategyofmultipletableswithuseofJoin;I'llputthestartofclasses:
RELEASE
@Entity@Inheritance(strategy=InheritanceType.JOINED)@DiscriminatorColumn(NAME="TIPO", discriminatorType=DiscriminatorType.CHAR)
@Table(name="LANCAMENTO")
public class Lancamento extends GenericModel{ ... }
SPANISH LANGUAGE
@Entity
public class LancamentoDespesa extends Lancamento{ ... }
RECENT_RUNNERS
@Entity
public class LancamentoReceita extends Lancamento{ ... }
SPANISH LANGUAGE_PARCELED
@Entity
public class LancamentoDespesa extends LancamentoDespesa{
@Column(name = "PARCELA", nullable = true)
private int numParcela;
GET/SET...
}
Final remarks: In SQL developer creates the inheritance tables, but also creates 4 other tables with names:
HT_LANCAMENTO
HT_LANCAMENTODESPESA
HT_LANCAMENTORECEITA
HT_LANCAMENTODESPESAPARCELADA
And all have in the drawing of the table a square with x.
I can not get another photo here if I did not.