Skip to content

Commit 5c49d7a

Browse files
gavinkingsebersole
authored andcommitted
HHH-18139 further integrate legacy identifier generates with new infrastructure
- recover ability to use BeanContainer - simplify logic by making full use of Generator.allowAssignedIdentifiers() - various simplifications - deprecate CustomIdGeneratorCreationContext (which was incubating) Signed-off-by: Gavin King <gavin@hibernate.org>
1 parent cc72a55 commit 5c49d7a

File tree

16 files changed

+378
-288
lines changed

16 files changed

+378
-288
lines changed

hibernate-core/src/main/java/org/hibernate/boot/model/internal/EmbeddableBinder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262

6363
import static org.hibernate.boot.model.internal.AnnotatedDiscriminatorColumn.DEFAULT_DISCRIMINATOR_COLUMN_NAME;
6464
import static org.hibernate.boot.model.internal.AnnotatedDiscriminatorColumn.buildDiscriminatorColumn;
65-
import static org.hibernate.boot.model.internal.BinderHelper.getOverridableAnnotation;
65+
import static org.hibernate.boot.model.internal.DialectOverridesAnnotationHelper.getOverridableAnnotation;
6666
import static org.hibernate.boot.model.internal.BinderHelper.getPath;
6767
import static org.hibernate.boot.model.internal.BinderHelper.getPropertyOverriddenByMapperOrMapsId;
6868
import static org.hibernate.boot.model.internal.BinderHelper.getRelativePath;
@@ -802,7 +802,7 @@ private static void processGeneratedId(MetadataBuildingContext context, Componen
802802
final AnnotationUsage<GeneratedValue> generatedValue = property.getAnnotationUsage( GeneratedValue.class );
803803
final String generatorType = generatedValue != null
804804
? generatorType( generatedValue, property.getType().determineRawClass(), context )
805-
: DEFAULT_ID_GEN_STRATEGY;
805+
: GeneratorBinder.ASSIGNED_GENERATOR_NAME;
806806
final String generator = generatedValue != null ? generatedValue.getString( "generator" ) : "";
807807

808808
if ( isGlobalGeneratorNameGlobal( context ) ) {

hibernate-core/src/main/java/org/hibernate/boot/model/internal/EntityBinder.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@
169169
import static org.hibernate.internal.util.StringHelper.nullIfEmpty;
170170
import static org.hibernate.internal.util.StringHelper.unqualify;
171171
import static org.hibernate.internal.util.collections.CollectionHelper.isNotEmpty;
172-
import static org.hibernate.mapping.SimpleValue.DEFAULT_ID_GEN_STRATEGY;
173172

174173

175174
/**
@@ -750,7 +749,7 @@ private static void handleIdGenerator(PropertyData inferredData, MetadataBuildin
750749
buildingContext.getMetadataCollector().addSecondPass( new IdGeneratorResolverSecondPass(
751750
id,
752751
inferredData.getAttributeMember(),
753-
DEFAULT_ID_GEN_STRATEGY,
752+
GeneratorBinder.ASSIGNED_GENERATOR_NAME,
754753
"",
755754
buildingContext
756755
) );
@@ -759,7 +758,7 @@ private static void handleIdGenerator(PropertyData inferredData, MetadataBuildin
759758
makeIdGenerator(
760759
id,
761760
inferredData.getAttributeMember(),
762-
DEFAULT_ID_GEN_STRATEGY,
761+
GeneratorBinder.ASSIGNED_GENERATOR_NAME,
763762
"",
764763
buildingContext,
765764
Collections.emptyMap()

0 commit comments

Comments
 (0)