Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] [ANN] EclipseLink 2.7.7 Released

På fredag 08. mai 2020 kl. 02:36:13, skrev Lukas Jungmann <lukas.jungmann@xxxxxxxxxx>:
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 :
@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
@Table(name = "origo_expense")
@PrimaryKeyJoinColumn(name = "entity_id")
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

Back to the top