Changeset 409 for GearsORM/trunk

Show
Ignore:
Timestamp:
03/22/08 01:53:54 (9 months ago)
Author:
uriel
Message:

moved undefined checking to _updateInsert,putting it in execute will be a preformence hit in all the ORM instead in a specific place

Location:
GearsORM/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • GearsORM/trunk/GearsORM.Model.js

    r407 r409  
    113113                                { 
    114114                                        var value = this[fieldName]; 
    115                                         if(!field.isRelation) 
     115                                        if(typeof(value) == "undefined") 
     116                                                values.push(null); 
     117                                        else if(!field.isRelation) 
    116118                                                values.push(value); 
    117119                                        else 
  • GearsORM/trunk/GearsORM.js

    r408 r409  
    5656                try 
    5757                { 
    58                         if(params) 
    59               for(var i=0;i<params.length;i++) 
    60                 if(typeof(params[i]) == 'undefined') params[i] = null; 
    61                                  
    6258                        if(GearsORM.debug)GearsORM.log(sql,params); 
    6359                        return GearsORM.getDB().execute(sql,params || []);