Hibernate Sets Collection Field to Null on EntityManager.merge

Description

Consider the following entities:

When

is invoked, LINE 30 prints the correct list entities

Bu when:

is invoked, LINE 30 prints null.

We can reproduce the following, using the simple application here in wildfly 8.1.0

https://github.com/marembo2008/hibernate-jpa-bug

Environment

Wildfly 8.1.0-Final Application Server, Mysql Database

Activity

Show:
marembo ochieng'
April 28, 2015, 11:55 AM

Detected that the issue is within the following line of code:

/org/hibernate/event/internal/DefaultMergeEventListener.java

marembo ochieng'
April 28, 2015, 12:15 PM

I may have stumbled upon why this happens, but i do not have an Idea why it so happens since, it will still be persisted correctly.

/org/hibernate/hibernate-core/4.3.5.Final/hibernate-core-4.3.5.Final-sources.jar:org/hibernate/type/AbstractType.java

Assignee

Gail Badner

Reporter

marembo ochieng'

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure