Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Property-change event fails because of IndirectSet.attributeName is null

Hi all.
 
I have this mapping in a class Invoice:
@Convert(converter = classOf[InvoiceAttributeUserType])
@ElementCollection
@Column(name = "attribute_name")
@CollectionTable(name="origo_invoice_attribute_usage", joinColumns = Array(new JoinColumn(name="invoice_id")))
var attributes: JUSet[InvoiceAttribute.ExtendedValue] = new JUHashSet()
 
When issuing:
invoice.attributes.add(InvoiceAttribute.INVOICE_ATTRIBUTE_SENDING)
I get this stack-trace:
 
Exception [EclipseLink-7173] (Eclipse Persistence Services - 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.ValidationException
Exception Description: A property change event has been fired on a property with name [null] in [class no.officenet.origo.core.domain.model.invoice.Invoice].  However this property does not exist.
        at org.eclipse.persistence.exceptions.ValidationException.wrongPropertyNameInChangeEvent(ValidationException.java:2107)
        at org.eclipse.persistence.internal.descriptors.changetracking.AttributeChangeListener.internalPropertyChange(AttributeChangeListener.java:127)
        at org.eclipse.persistence.internal.descriptors.changetracking.AttributeChangeListener.propertyChange(AttributeChangeListener.java:111)
        at org.eclipse.persistence.indirection.IndirectSet.raiseAddChangeEvent(IndirectSet.java:621)
        at org.eclipse.persistence.indirection.IndirectSet.add(IndirectSet.java:191)
        at no.officenet.origo.invoice.application.service.InvoiceAppService$class.enqueueSendInvoice(InvoiceAppService.scala:382)
 
 
The strange thing is I only get this exception when operating on a managed entity retrieved using find(clazz, PK, LockModeType.PESSIMISTIC_WRITE). If I use regular find(clazz, PK) then everything is smooth.
 
Anyone knows why this happens?
 
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963

Back to the top