Update of /cvsroot/modus/org/bacfug/modus
In directory usw-pr-cvs1:/tmp/cvs-serv14693/bacfug/modus
Modified Files:
basecontentobject.cfc
Log Message:
no need to instantiate a persister every time, just put it in the server scope. We need a cleaner way to do this, but for now it proves that it works to put the persister in memory and reuse it.
Index: basecontentobject.cfc
===================================================================
RCS file: /cvsroot/modus/org/bacfug/modus/basecontentobject.cfc,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** basecontentobject.cfc 5 Oct 2002 00:54:06 -0000 1.14
--- basecontentobject.cfc 5 Nov 2002 23:08:05 -0000 1.15
***************
*** 23,28 ****
instance.wasLoadedFlag = false;
//create an instance of the persister for this object if we need to, to avoid unnecessary createObject() calls later
! if(NOT structKeyExists(instance,"persister"))
! instance.persister = createObject("component",instance.persisterComponent).init();
//initialize the properties of this instance
initProperties();
--- 23,35 ----
instance.wasLoadedFlag = false;
//create an instance of the persister for this object if we need to, to avoid unnecessary createObject() calls later
! if(NOT structKeyExists(instance,"persister")){
! if(structKeyExists(server.modus,instance.persisterComponent)){
! instance.persister = server.modus[instance.persisterComponent];
! }
! else{
! instance.persister = createObject("component",instance.persisterComponent).init();
! server.modus[instance.persisterComponent] = instance.persister;
! }
! }
//initialize the properties of this instance
initProperties();
|