Statistics.getCollectionRoleNames() reports incorrect value

Description

Statistics:getCollectionRoleNames() returns an incorrect value because it uses MetamodelImpl:getAllCollectionRoles() that uses the "entityPersisterMap" attribute instead of "collectionPersisterMap".

The fix is quite simple: use the correct attribute in that getter.

I met this issue with Hibernate 5.2.12 and still saw it in the 5.2.17 and current (2018/08/13) master sources.

I will submit a PR for master. But it should be applied to other branches as well.

Note that this is my first Hibernate contribution, I'm not familiar with the process yet.

Environment

None

Status

Assignee

Florian Beaufumé

Reporter

Florian Beaufumé

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