Skip to content

Commit

Permalink
Should be SimpleValue
Browse files Browse the repository at this point in the history
  • Loading branch information
filipelautert committed Sep 21, 2023
1 parent ab88e52 commit 5f4faf7
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
import liquibase.structure.core.Table;
import org.hibernate.boot.spi.MetadataImplementor;
import org.hibernate.generator.Generator;
import org.hibernate.mapping.Component;
import org.hibernate.mapping.Join;
import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.RootClass;
import org.hibernate.mapping.*;

import java.util.ArrayList;
import java.util.Collection;
Expand Down Expand Up @@ -85,9 +82,9 @@ protected void addTo(DatabaseObject foundObject, DatabaseSnapshot snapshot) thro
Iterator<PersistentClass> classMappings = entityBindings.iterator();
while (classMappings.hasNext()) {
PersistentClass persistentClass = classMappings.next();
if (!persistentClass.isInherited() && persistentClass.getIdentifier() instanceof Component) {
var component = (Component) persistentClass.getIdentifier();
Generator ig = component.createGenerator(
if (!persistentClass.isInherited() && persistentClass.getIdentifier() instanceof SimpleValue) {
var simpleValue = (SimpleValue) persistentClass.getIdentifier();
Generator ig = simpleValue.createGenerator(
metadata.getMetadataBuildingOptions().getIdentifierGeneratorFactory(),
database.getDialect(),
(RootClass) persistentClass
Expand Down

0 comments on commit 5f4faf7

Please sign in to comment.