import java.util.Iterator;
import java.util.Set;
-import org.hibernate.Session;
-import org.splat.dal.dao.som.Database;
import org.splat.kernel.InvalidPropertyException;
import org.splat.kernel.MissedPropertyException;
import org.splat.kernel.MultiplyDefinedException;
for (Iterator<Attribute> i=attributes.iterator(); i.hasNext(); ) {
if (!i.next().equals(field)) continue;
i.remove();
- if (this.isSaved()) Database.getSession().update(this);
+ //RKV if (this.isSaved()) Database.getCurSession().update(this);
return true;
}
return false;
public boolean setAttribute (Attribute field) {
// ------------------------------------------------
Class<?> type = field.getClass();
- Session session = Database.getSession();
+//RKV Session session = Database.getCurSession();
if (!field.getFrom().equals(this)) return false;
for (Iterator<Attribute> i=attributes.iterator(); i.hasNext(); ) {
}
attributes.add(field);
if (this.isSaved()) {
- if (!field.isSaved()) session.save(field);
- session.update(this);
+ //RKV if (!field.isSaved()) session.save(field);
+ //RKV session.update(this);
} // Else, when saving this, Hibernate will propagate the operation
return true;
}