protected void bindJoinedSubClass ( HibernatePersistentEntity sub , JoinedSubclass joinedSubclass , InFlightMetadataCollector mappings , Mapping gormMapping , String sessionFactoryBeanName ) { bindClass ( sub , joinedSubclass , mappings ) ; String schemaName = getSchemaName ( mappings ) ; String catalogName = getCatalogName ( mappings ) ; Table mytable = mappings . addTable ( schemaName , catalogName , getJoinedSubClassTableName ( sub , joinedSubclass , null , mappings , sessionFactoryBeanName ) , null , false ) ; joinedSubclass . setTable ( mytable ) ; LOG . info ( "Mapping joined-subclass: " + joinedSubclass . getEntityName ( ) + " -> " + joinedSubclass . getTable ( ) . getName ( ) ) ; SimpleValue key = new DependantValue ( metadataBuildingContext , mytable , joinedSubclass . getIdentifier ( ) ) ; joinedSubclass . setKey ( key ) ; final PersistentProperty identifier = sub . getIdentity ( ) ; String columnName = getColumnNameForPropertyAndPath ( identifier , EMPTY_PATH , null , sessionFactoryBeanName ) ; bindSimpleValue ( identifier . getType ( ) . getName ( ) , key , false , columnName , mappings ) ; joinedSubclass . createPrimaryKey ( ) ; // properties createClassProperties ( sub , joinedSubclass , mappings , sessionFactoryBeanName ) ; }
Binds a joined sub - class mapping using table - per - subclass