Code example for Collection

Methods: isInverse

0
    } 
 
    private void storeMiddleEntityRelationInformation(String mappedBy) {
        // Only if this is a relation (when there is a referenced entity). 
        if (referencedEntityName != null) {
            if (propertyValue.isInverse()) {
                referencingEntityConfiguration.addToManyMiddleNotOwningRelation(propertyName, mappedBy, referencedEntityName);
            } else { 
                referencingEntityConfiguration.addToManyMiddleRelation(propertyName, referencedEntityName);
            } 
        } 
    } 
 
    private Element createMiddleEntityXml(String auditMiddleTableName, String auditMiddleEntityName, String where) {
        String schema = mainGenerator.getSchema(propertyAuditingData.getJoinTable().schema(), propertyValue.getCollectionTable());
        String catalog = mainGenerator.getCatalog(propertyAuditingData.getJoinTable().catalog(), propertyValue.getCollectionTable());
 
        Element middleEntityXml = MetadataTools.createEntity(xmlMappingData.newAdditionalMapping(),
                new AuditTableData(auditMiddleEntityName, auditMiddleTableName, schema, catalog), null);
        Element middleEntityXmlId = middleEntityXml.addElement("composite-id");