Update of /cvsroot/modeling/ProjectModeling/Modeling/tests/testPackages/AuthorBooks
In directory sc8-pr-cvs1:/tmp/cvs-serv15541/tests/testPackages/AuthorBooks
Modified Files:
Book.py model_AuthorBooks.xml
Log Message:
Fixed: an newly inserted object with a PK attribute marked as class
property did not get its value after EditingContext.saveChanges().
Details in:
- EditingContext.handleNotification()
- test_EC_Global.test_17_insertedObject_and_PK_as_classProperty()
- testPackages.AuthorBooks: entity Book now has its PK 'id' set as class
property
Index: Book.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/testPackages/AuthorBooks/Book.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Book.py 2 Oct 2002 08:39:50 -0000 1.3
--- Book.py 27 Mar 2003 11:47:57 -0000 1.4
***************
*** 16,19 ****
--- 16,20 ----
# every parameter gets a default value, since the framework needs to be
# able to instanciate an object with no parameter at all.
+ self._id = 0 ## please consider this as a read-only attribute
self._title = 'D\'la balle'
self._price=None
***************
*** 27,30 ****
--- 28,36 ----
# =================== title ==========================
+
+ def getId(self):
+ "Return the Book / id attribute value"
+ self.willRead()
+ return self._id
def getTitle(self):
Index: model_AuthorBooks.xml
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/testPackages/AuthorBooks/model_AuthorBooks.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** model_AuthorBooks.xml 1 Feb 2003 16:15:07 -0000 1.4
--- model_AuthorBooks.xml 27 Mar 2003 11:47:57 -0000 1.5
***************
*** 1,3 ****
--- 1,4 ----
<?xml version='1.0' encoding='iso-8859-1'?>
+ <!-- <!DOCTYPE model SYSTEM "mdl_model.dtd"> -->
<model name='AuthorBooks' packageName='AuthorBooks' adaptorName='Postgresql' connectionDictionary="{'database': 'AUTHOR_BOOKS', 'user': 'postgres', 'password': '', 'host': 'localhost'}">
<entity isReadOnly='0' externalName='WRITER' name='Writer' parentEntity='' className='Writer' typeName='Writer' isAbstract='0'>
***************
*** 25,29 ****
<attributesUsedForLocking attributeName='FK_Writer_Id'/>
<attribute isClassProperty='1' columnName='title' name='title' isRequired='1' precision='0' defaultValue='None' externalType='VARCHAR' width='40' scale='0' type='string' displayLabel='Title'/>
! <attribute isClassProperty='0' columnName='id' name='id' isRequired='1' precision='0' defaultValue='0' externalType='INT' width='0' scale='0' type='int' displayLabel=''/>
<attribute isClassProperty='0' columnName='FK_WRITER_ID' name='FK_Writer_Id' isRequired='0' precision='0' defaultValue='None' externalType='INTEGER' width='0' scale='0' type='string' displayLabel=''/>
<attribute isClassProperty='1' columnName='PRICE' name='price' isRequired='0' precision='10' defaultValue='None' externalType='NUMERIC' width='0' scale='2' type='float' displayLabel=''/>
--- 26,30 ----
<attributesUsedForLocking attributeName='FK_Writer_Id'/>
<attribute isClassProperty='1' columnName='title' name='title' isRequired='1' precision='0' defaultValue='None' externalType='VARCHAR' width='40' scale='0' type='string' displayLabel='Title'/>
! <attribute isClassProperty='1' columnName='id' name='id' isRequired='1' precision='0' defaultValue='0' externalType='INT' width='0' scale='0' type='int' displayLabel=''/>
<attribute isClassProperty='0' columnName='FK_WRITER_ID' name='FK_Writer_Id' isRequired='0' precision='0' defaultValue='None' externalType='INTEGER' width='0' scale='0' type='string' displayLabel=''/>
<attribute isClassProperty='1' columnName='PRICE' name='price' isRequired='0' precision='10' defaultValue='None' externalType='NUMERIC' width='0' scale='2' type='float' displayLabel=''/>
|