private void deletePolymorphicChildrenShallow ( OneToManyPolymorphicAssociation association ) { String targetTable = metaModelOf ( association . getTargetClass ( ) ) . getTableName ( ) ; String parentType = association . getTypeLabel ( ) ; new DB ( metaModelLocal . getDbName ( ) ) . exec ( "DELETE FROM " + targetTable + " WHERE parent_id = ? AND parent_type = ?" , getId ( ) , parentType ) ; }
Deletes immediate polymorphic children