" -> " + join.getTable().getName()
);
// KEY
Element keyNode = node.element( "key" );
SimpleValue key = new DependantValue( table, persistentClass.getIdentifier() );
join.setKey( key );
key.setCascadeDeleteEnabled( "cascade".equals( keyNode.attributeValue( "on-delete" ) ) );
bindSimpleValue( keyNode, key, false, persistentClass.getEntityName(), mappings );
// join.getKey().setType( new Type( lazz.getIdentifier() ) );
join.createPrimaryKey();
join.createForeignKey();
// PROPERTIES
Iterator iter = node.elementIterator();
while ( iter.hasNext() ) {
Element subnode = (Element) iter.next();
String name = subnode.getName();
String propertyName = subnode.attributeValue( "name" );
Value value = null;
if ( "many-to-one".equals( name ) ) {
value = new ManyToOne( table );
bindManyToOne( subnode, (ManyToOne) value, propertyName, true, mappings );
}
else if ( "any".equals( name ) ) {
value = new Any( table );
bindAny( subnode, (Any) value, true, mappings );
}
else if ( "property".equals( name ) ) {
value = new SimpleValue( table );
bindSimpleValue( subnode, (SimpleValue) value, true, propertyName, mappings );
}
else if ( "component".equals( name ) || "dynamic-component".equals( name ) ) {
String subpath = StringHelper.qualify( path, propertyName );
value = new Component( join );