Browse Source

fix, enable setting connection to null.

Nicolas Cannasse 19 years ago
parent
commit
8df0a70d65
1 changed files with 2 additions and 1 deletions
  1. 2 1
      std/neko/db/Manager.hx

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

@@ -43,7 +43,8 @@ class Manager<T : Object> {
 
 	private static function setConnection( c : Connection ) {
 		Reflect.setField(Manager,"cnx",c);
-		FOR_UPDATE = if( c.hasFeature(ForUpdate) ) " FOR UPDATE" else "";
+		if( c != null )
+			FOR_UPDATE = if( c.hasFeature(ForUpdate) ) " FOR UPDATE" else "";
 		return c;
 	}