|
I think the disambiguation should be done at the ORM layer as ORM knows about @Transient and the JPA semantics. Here is the code proposal https://github.com/hibernate/hibernate-orm/pull/1133
The main reason is that HCANN does not know about JPA rules by design. It is reused by other layers that should not react to @Transient.
In absolute, we could consider that having boolean isId(); String getId(); is a sin and should always raise an exception which would then allow us to move the rule down to HCANN. But I fear it would break existing applications without offering then an easy way out (adding @Transient).
|