Issues
- Cannot override non-identifier propety from @MappedSuperclass and make it identifier in subclassHHH-15529
- SQLGrammarException if entity field name is 'elements'HHH-12936Resolved issue: HHH-12936Vlad Mihalcea
- @Filter definition not applied to JPA find methodHHH-11973Resolved issue: HHH-11973Former user
- AuditReader returns deleted referencesHHH-11909Resolved issue: HHH-11909Chris Cranford
- Detect custom type automatically in native postgres sql queryHHH-11840Resolved issue: HHH-11840Christian Beikov
- Map of @Embeddables has values loaded only when != nullHHH-11723Resolved issue: HHH-11723Andrea Boriero
- LegacyFallbackInterpreter does not set properly sequence nameHHH-11552Resolved issue: HHH-11552Andrea Boriero
- @JoinTable annotation is not respected by hbm2ddlHHH-11534Resolved issue: HHH-11534Chris Cranford
- HHH90000016: Found use of deprecated 'collection property' issue for valid JPQL queryHHH-11400Resolved issue: HHH-11400Steve Ebersole
- CascadeEntityJoinWalker.isTooManyCollections() causes random behaviorHHH-11359Resolved issue: HHH-11359
- got the "Batch update" exception when I use unidirectional One-To-Many and Table Per Class InheritanceTypeHHH-11351
- Oracle Spatial Dialect non-string mode is unavailableHHH-11301Resolved issue: HHH-11301
- Document supported use/implications of @Cache / @CacheableHHH-11142Resolved issue: HHH-11142Vlad Mihalcea
- Naming Strategy Does not affect the user-specified index/foreign-key namesHHH-11089Resolved issue: HHH-11089Vlad Mihalcea
- @Filter query is not passed through the current dialectHHH-11088Resolved issue: HHH-11088
- OneToOne shared primary key relationship breaks with field annotationsHHH-11068Resolved issue: HHH-11068
- Cascaded merge of a Many-to-many link entity generates invalid INSERTHHH-11026
- subselect is ignored in EntityLoaderHHH-11015Resolved issue: HHH-11015Former user
- ORM >= 5.0.9 not picking up sequence name when hibernate.id.new_generator_mappings = falseHHH-11011Resolved issue: HHH-11011Vlad Mihalcea
- org.hibernate.AnnotationException: Unable to create unique key constraint - if column not foundHHH-11009Resolved issue: HHH-11009Chris Cranford
- java.lang.NullPointerException due to converterHHH-11003Resolved issue: HHH-11003
- Add documentation section about Filter and FilterDefHHH-11002Resolved issue: HHH-11002Vlad Mihalcea
- NullPointerException when using join with subselect in hbm mappingHHH-10998Resolved issue: HHH-10998Andrea Boriero
- NPE when Lazy loading collection without transaction for bytecode enhanced entitieHHH-10993Resolved issue: HHH-10993Former user
- Wrong order parameter binding when filters are used in conjunction with component type parameters and subqueriesHHH-10991Resolved issue: HHH-10991Andrea Boriero
- Cannot save JTS geometry with SRID 3857 into SRID 3857 columnHHH-10987Resolved issue: HHH-10987Karel Maesen
- HBM 'properties' element not honouring multi-column constraintHHH-10982Resolved issue: HHH-10982
- Use UTF-8 charset for reading files for initializing the database (javax.persistence.sql-load-script-source scripts)HHH-10972Resolved issue: HHH-10972Vlad Mihalcea
- Document @DiscriminatorValue NULL and NOT_NULL optionsHHH-10966Resolved issue: HHH-10966Vlad Mihalcea
- HQL update statement fails if entity is inside a package of format in.mycomany.domain.EntityHHH-10953Resolved issue: HHH-10953Andrea Boriero
- The generation of the drop schema does not filter sequence with schemaFilterHHH-10937Resolved issue: HHH-10937Andrea Boriero
- Hibernate make same aliases for different joinsHHH-10932Resolved issue: HHH-10932
- HQL: Sql syntax exception when joining a Map<Entity,Component>HHH-10919Resolved issue: HHH-10919Andrea Boriero
- NullPointerException when StatelessSession.get(Class, Serializable, LockMode) called with null LockMode, instead of defaulting to LockMode.NONEHHH-10905Resolved issue: HHH-10905Chris Cranford
- BytecodeEnhancement's AssociationManagement breaks with entity containing two relations with the same mappedBy valueHHH-10894Resolved issue: HHH-10894
- Exception at bootstrap when @Any is inside an @Embeddable objectHHH-10891Resolved issue: HHH-10891
- hibernate.default_batch_fetch_size can create deadlocksHHH-10881Resolved issue: HHH-10881
- Bad sql with composite keysHHH-10880Resolved issue: HHH-10880
- Improve consistency of how we call implicitNamingStrategy.determineBasicColumnName with element collectionsHHH-10863Resolved issue: HHH-10863Guillaume Smet
- JPA Constructor Expressions fails with nullLiteral passed to constructorHHH-10861Resolved issue: HHH-10861Andrea Boriero
- @Convert annotation on attribute of @Embeddable does not workHHH-10857Resolved issue: HHH-10857
- Hibernate OSGi overrides a custom JTA PlatformHHH-10856Resolved issue: HHH-10856Brett Meyer
- Hibernate OSGi discovers the wrong entity typeHHH-10855Resolved issue: HHH-10855Brett Meyer
- PropertyAccessMixed not aware of Access annotationHHH-10851Resolved issue: HHH-10851Luis Barreiro
- QuerySyntaxException when use CriteriaBuilder.concat in selectCase expressionHHH-10843Resolved issue: HHH-10843Andrea Boriero
- Hibernate method to un-proxy a javassist proxyHHH-10831Resolved issue: HHH-10831Vlad Mihalcea
- Bytecode enhancement of @MappedSuperclassHHH-10801Resolved issue: HHH-10801Luis Barreiro
- org.hibernate.query.Query<R> setProperties(Map map); set to null parameters not contained in the mapHHH-10796Resolved issue: HHH-10796Andrea Boriero
- StatefulPersistenceContext.entityEntryContext does not work properly for ManagedEntity associated with a different StatefulPersistenceContextHHH-10795Resolved issue: HHH-10795Former user
- JPA / HQL query using 'values(?1), (?2) ...' failsHHH-10790
50 of 106
Cannot override non-identifier propety from @MappedSuperclass and make it identifier in subclass
Description
Attachments
1
relates to
Created September 19, 2022 at 3:59 PM
Updated September 26, 2022 at 11:35 AM
Activity
Show:
I’ve got a @MappedSuperClass A defining field testA as non-identifier. Class B extends Class A, defining additional field testB. Class B annotates both field testA and field testB with @Id.
At runtime, hibernate 5.6.11 complains:
org.hibernate.MappingException: You cannot override the [testA] non-identifier property from the [sample.entities.A] base class or @MappedSuperclass and make it an identifier in the [sample.entities.B] subclass!
Earlier versions just silently ignore the @Id annotation on testA.
If I annotate testA as @Id in the MappedSuperclass, the code runs fine, but this violates JPA spec (JPA 2.1 http://download.oracle.com/otndocs/jcp/persistence-2_1-fr-eval-spec - Chapter 2.4):
Why does hibernate handle things like this? Is there a way around it?