Do not inject CollectionTracker into entity without collection

Description

I have the following entity

after instrumentation this entity contains

which is redundant as entity does not have any collection field.

Environment

None

Activity

Show:
Luis Barreiro
June 22, 2017, 3:19 PM

Although is technically possible to remove the field, at this moment it would add some complexity to the enhancer. Let's keep this open for future reference.

Sergei Tsypanov
June 22, 2017, 8:04 PM

Sure, it's just a minor enhancement. It'd not give any significant performance improvement.

Sergei Tsypanov
June 22, 2017, 9:39 PM

Also it's interesting that the field is assigned after entity becomes persistent. See attached screenshots
screenshot before save
screenshot after save

Luis Barreiro
September 7, 2017, 6:03 AM

PR with fixes for both Javassist and ByteBuddy enhancers: https://github.com/hibernate/hibernate-orm/pull/1963

Gail Badner
September 12, 2017, 9:15 PM

Fixed in master.

Assignee

Luis Barreiro

Reporter

Sergei Tsypanov

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Minor
Configure