JPA metamodel generator does not generate SingularAttribute of another entity

Description

Refer to the sample code to reproduce the issue.

It contains only 2 classes: Book and Author.
The sample code contains different cases which I placed in separate java package.

The Book class has Author field that is not generated by annotation processor in 1 case.

package

Author

Book

Generated metamodel Book_.java

domain1

without implements Serializable

@Entity

The SingularAttribute of author is generated

domain2

without implements Serializable

@MappedSuperclass

The SingularAttribute of author is NOT generated

domain3

implements Serializable

@MappedSuperclass

The SingularAttribute of author is generated

domain4

without implements Serializable

@MappedSuperclass, author field is annotated with AccessType.PROPERTY

The SingularAttribute of author is generated

Environment

None

Assignee

Unassigned

Reporter

Max Huang

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure