[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] [ANN] EclipseLink 2.7.7 Released
|
We are pleased to announce the availability of the EclipseLink 2.7.7
Release [1]
This is a bugfix release of EclipseLink 2.7.6, no new features are included.
This release introduces a bug in @ReturnInsert when used in InheritanceType.JOINED
I have :
@Entity
@Table(name = "onp_crm_entity")
@Inheritance(strategy = InheritanceType.JOINED)
@DiscriminatorColumn(name = "type", discriminatorType = DiscriminatorType.STRING)
@SequenceGenerator(name = "AbstractEntityObjectSEQ_STORE", sequenceName = "onp_crm_entity_id_seq", allocationSize = 1)
abstract class AbstractEntityObject
@Entity
@Table(name = "origo_expense")
@PrimaryKeyJoinColumn(name = "entity_id")
@DiscriminatorValue("EXPENSE_BUNDLE")
class Expense(_created: DateTime,
_createdBy: User, _forUser: User) extends AbstractEntityObject
/// Fields in Expense
@Column(name = "expense_nr", nullable = false, unique = true, updatable = false)
@ReturnInsert(returnOnly = true)
String expenseNumber = null;
This generates the following INSERT:
INSERT INTO onp_crm_entity (entity_id, type, version) VALUES ($1, $2, $3) RETURNING expense_nr
So EL now inserts the "RETURNING expense_nr" in the parent-entity's INSERT, which is wrong as that column exists in the JOINED-relation Expense(table origo_expense).
Downgrading to 2.7.6 makes the problem go away...
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963