Ejemplo n.º 1
0
 protected void BindJoins(IEnumerable <HbmJoin> joins, PersistentClass persistentClass, IDictionary <string, MetaAttribute> inheritedMetas)
 {
     foreach (var hbmJoin in joins)
     {
         var join = new Join {
             PersistentClass = persistentClass
         };
         BindJoin(hbmJoin, join, inheritedMetas);
         persistentClass.AddJoin(join);
     }
 }
Ejemplo n.º 2
0
        private void BindJoinToPersistentClass(Join join, Ejb3JoinColumn[] ejb3JoinColumns)
        {
            SimpleValue key = new DependantValue(join.Table, persistentClass.Identifier);

            join.Key = key;
            SetFKNameIfDefined(join);
            key.IsCascadeDeleteEnabled = false;
            TableBinder.BindFk(persistentClass, null, ejb3JoinColumns, key, false, mappings);
            join.CreatePrimaryKey(dialect);
            join.CreateForeignKey();
            persistentClass.AddJoin(join);
        }