Browse Source

added error reporting for invalid manager in relations.

Nicolas Cannasse 19 years ago
parent
commit
68ee5569e4
1 changed files with 1 additions and 0 deletions
  1. 1 0
      std/neko/db/Manager.hx

+ 1 - 0
std/neko/db/Manager.hx

@@ -406,6 +406,7 @@ class Manager<T : Object> {
 		var manager = r.manager;
 		var hprop = "__"+r.prop;
 		var hkey = r.key;
+		if( manager == null || manager.table_keys == null ) throw ("Invalid manager for relation "+table_name+":"+r.prop);
 		if( manager.table_keys.length != 1 ) throw ("Relation "+r.prop+"("+r.key+") on a multiple key table");
 		Reflect.setField(class_proto.prototype,"get_"+r.prop,function() {
 			var othis = untyped this;