Generic superclass handled wrongly in criteria metamodel

Description

We have generic abstract class GenericDependency and several implementing subclasses.

In persistence.xml we have them in this order:

The problem occured when using criteria api:

In child there were reference to Artifact instead of Release so it throws exception on the 3rd line as it can't found project attribute on Artifact.

The reason is that when building metamodel, ArtifactArtifactDependency is processed first and it's superclass GenericDependency metamodel is build with attributes child and parent as Artifact.
When building metamoded for ArtifactReleaseDependency, the superclass metamodel is reused resulting in wrong thinking that child attribute is Artifact instead of Release.

Environment

None

Assignee

Unassigned

Reporter

Honza Brázdil

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