modeling-cvs Mailing List for Object-Relational Bridge for python (Page 18)
Status: Abandoned
Brought to you by:
sbigaret
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
(54) |
Apr
(29) |
May
(94) |
Jun
(47) |
Jul
(156) |
Aug
(132) |
Sep
(40) |
Oct
(6) |
Nov
(18) |
Dec
(24) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(18) |
Feb
(59) |
Mar
(7) |
Apr
|
May
(8) |
Jun
(2) |
Jul
(12) |
Aug
(15) |
Sep
(12) |
Oct
(6) |
Nov
(25) |
Dec
(1) |
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
(27) |
Mar
|
Apr
(16) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <sbi...@us...> - 2003-08-02 09:40:52
|
Update of /cvsroot/modeling/ProjectModeling/Modeling
In directory sc8-pr-cvs1:/tmp/cvs-serv19706
Modified Files:
CHANGES SQLExpression.py
Log Message:
Fixed bug #779775, on behalf of Yannick Gingras who reported the bug and gave
the patch fixing it.
Index: CHANGES
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/CHANGES,v
retrieving revision 1.140
retrieving revision 1.141
diff -C2 -d -r1.140 -r1.141
*** CHANGES 2 Aug 2003 08:07:16 -0000 1.140
--- CHANGES 2 Aug 2003 09:40:49 -0000 1.141
***************
*** 8,11 ****
--- 8,14 ----
--------------------------------------------------------
+ * Fixed bug #779775, on behalf of Yannick Gingras who reported the bug and
+ gave the patch fixing it.
+
* Fixed bug #781884: SQLiteAdaptorLayer: dropping and creating a database
was not possible (and was failing w/ an ugly traceback)
Index: SQLExpression.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/SQLExpression.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** SQLExpression.py 24 Jul 2003 12:07:25 -0000 1.19
--- SQLExpression.py 2 Aug 2003 09:40:49 -0000 1.20
***************
*** 1233,1237 ****
return '(%s)'%aList[0]
else:
! return str(tuple(aList))
def sqlStringForNegatedQualifier(self, aQualifier):
--- 1233,1237 ----
return '(%s)'%aList[0]
else:
! return "(%s)" % ", ".join(map(str, aList))
def sqlStringForNegatedQualifier(self, aQualifier):
|
|
From: <sbi...@us...> - 2003-08-02 09:40:52
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv19706/tests
Modified Files:
test_EditingContext_Global.py
Log Message:
Fixed bug #779775, on behalf of Yannick Gingras who reported the bug and gave
the patch fixing it.
Index: test_EditingContext_Global.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_EditingContext_Global.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** test_EditingContext_Global.py 28 Jul 2003 06:03:36 -0000 1.34
--- test_EditingContext_Global.py 2 Aug 2003 09:40:49 -0000 1.35
***************
*** 949,952 ****
--- 949,964 ----
self.failUnless('Cleese' in objects_names)
+ def test_19b_in_not_in_operators_in_qualifiers_with_long(self):
+ "[EditingContext] IN/NOT IN operators in qualifiers with longs"
+ # Bug #779775
+ from Modeling.Qualifier import KeyValueQualifier, QualifierOperatorIn
+ ec=EditingContext()
+ q=KeyValueQualifier('age', QualifierOperatorIn, [24L, 81L, 82L])
+ objects=ec.fetch('Writer', q)
+ objects_names=[o.getLastName() for o in objects]
+ self.failUnless(len(objects)==2)
+ self.failUnless('Cleese' in objects_names)
+ self.failUnless('Dard' in objects_names)
+
def test_20_snapshot(self):
"[EditingContext] snapshot: TBD"
|
|
From: <sbi...@us...> - 2003-08-02 08:58:50
|
Update of /cvsroot/modeling/ProjectModeling/Modeling
In directory sc8-pr-cvs1:/tmp/cvs-serv8223
Modified Files:
CHANGES
Log Message:
Fixed bug #781884: SQLiteAdaptorLayer: dropping and creating a
database was not possible (and was failing w/ an ugly traceback)
Index: CHANGES
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/CHANGES,v
retrieving revision 1.139
retrieving revision 1.140
diff -C2 -d -r1.139 -r1.140
*** CHANGES 31 Jul 2003 20:56:10 -0000 1.139
--- CHANGES 2 Aug 2003 08:07:16 -0000 1.140
***************
*** 8,11 ****
--- 8,14 ----
--------------------------------------------------------
+ * Fixed bug #781884: SQLiteAdaptorLayer: dropping and creating a database
+ was not possible (and was failing w/ an ugly traceback)
+
* Fixed MANIFEST.in and setup.py: the SQLite adaptor layer was omitted in
the source distribution! Thanks Mario for reporting.
|
|
From: <sbi...@us...> - 2003-08-02 08:58:49
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/SQLiteAdaptorLayer
In directory sc8-pr-cvs1:/tmp/cvs-serv8223/DatabaseAdaptors/SQLiteAdaptorLayer
Modified Files:
SQLiteAdaptor.py SQLiteSchemaGeneration.py
Log Message:
Fixed bug #781884: SQLiteAdaptorLayer: dropping and creating a
database was not possible (and was failing w/ an ugly traceback)
Index: SQLiteAdaptor.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/SQLiteAdaptorLayer/SQLiteAdaptor.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SQLiteAdaptor.py 11 Jun 2003 11:10:14 -0000 1.1
--- SQLiteAdaptor.py 2 Aug 2003 08:07:15 -0000 1.2
***************
*** 57,60 ****
--- 57,68 ----
return concreteAdaptorContext
+ def createDatabaseWithAdministrativeConnectionDictionary(self, administrativeConnectionDictionary, createUserFlag=0):
+ """
+ Overrides AbstractDBAPI2Adaptor's method and does nothing except opening
+ a connection to the new database, which is enough to create a database
+ with sqlite
+ """
+ self.dbAPI_gimmeCnxAndCursorForDBAdmin(administrativeConnectionDictionary)
+
def defaultExpressionClass(self):
"Returns Modeling.SQLExpression.SQLExpression"
***************
*** 62,65 ****
--- 70,87 ----
return SQLiteSQLExpression
+ def dropDatabaseWithAdministrativeConnectionDictionary(self, administrativeConnectionDictionary, dropUserFlag=0):
+ """
+ Overrides AbstractDBAPI2Adaptor's method and os.unlink() the database
+ file. Parameter administrativeConnectionDictionary cannot be omitted here,
+ even if there's no such connection dictionary for sqlite: the database
+ to be removed is extracted from the dictionary's 'database' key (this is
+ also to prevent the accidental destruction of valuable data).
+
+ Unlike other adaptors, this method does NOT call
+ SQLiteSchemaGeneration.dropDatabaseStatementsForConnectionDictionary()
+ """
+ import os
+ os.unlink(administrativeConnectionDictionary['database'])
+
def expressionFactory(self):
"See Modeling.interfaces.Adaptor for details"
***************
*** 81,87 ****
def dbAPI_gimmeCnxAndCursorForDBAdmin(self, administrativeConnectionDictionary):
cnxDict=self.dbAPI_connectionDictionaryForConnect(administrativeConnectionDictionary)
!
! cnx.autocommit()
return cnx, cnx.cursor()
--- 103,110 ----
def dbAPI_gimmeCnxAndCursorForDBAdmin(self, administrativeConnectionDictionary):
+ # Opening a connection to a new database is sufficient to create it
+ # However we return both a cnx and a cursor to be consistent w/ the API
cnxDict=self.dbAPI_connectionDictionaryForConnect(administrativeConnectionDictionary)
! cnx=apply(self.underlying_py_adaptor_module().connect, (), cnxDict)
return cnx, cnx.cursor()
Index: SQLiteSchemaGeneration.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/DatabaseAdaptors/SQLiteAdaptorLayer/SQLiteSchemaGeneration.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SQLiteSchemaGeneration.py 11 Jun 2003 11:10:17 -0000 1.1
--- SQLiteSchemaGeneration.py 2 Aug 2003 08:07:15 -0000 1.2
***************
*** 65,84 ****
def createDatabaseStatementsForConnectionDictionary(self, connectionDictionary, administrativeConnectionDictionary, createUserFlag=0):
"""
See also: interfaces.SchemaGeneration for details
"""
! createDB='CREATE DATABASE %(database)s'%connectionDictionary
! createUser='CREATE USER %(user)s NOCREATEUSER NOCREATEDB'%connectionDictionary
!
! sqlExprs=[]
! sqlExpr=self._adaptor.expressionClass()(None)
! sqlExpr.setStatement(createDB)
! sqlExprs.append(sqlExpr)
! # Create user
! if createUserFlag:
! sqlExpr=self._adaptor.expressionClass()(None)
! sqlExpr.setStatement(createUser)
! sqlExprs.append(sqlExpr)
! return tuple(sqlExprs)
!
def createTableStatementsForEntityGroup(self, entityGroup):
--- 65,74 ----
def createDatabaseStatementsForConnectionDictionary(self, connectionDictionary, administrativeConnectionDictionary, createUserFlag=0):
"""
+ Returns an empty list: connecting to a non existent database is sufficient
+ to create it.
+
See also: interfaces.SchemaGeneration for details
"""
! return ()
def createTableStatementsForEntityGroup(self, entityGroup):
***************
*** 113,131 ****
def dropDatabaseStatementsForConnectionDictionary(self, connectionDictionary, administrativeConnectionDictionary, dropUserFlag=0):
! "See Modeling.interfaces.SchemaGeneration for details"
! dropDB='DROP DATABASE %(database)s'%connectionDictionary
! dropUser='DROP USER %(user)s'%connectionDictionary
- sqlExprs=[]
- sqlExpr=self._adaptor.expressionClass()(None)
- sqlExpr.setStatement(dropDB)
- sqlExprs.append(sqlExpr)
- # Create user
- if dropUserFlag:
- sqlExpr=self._adaptor.expressionClass()(None)
- sqlExpr.setStatement(dropUser)
- sqlExprs.append(sqlExpr)
- return tuple(sqlExprs)
-
def dropForeignKeyConstraintStatementsForRelationship(self, relationship):
"""returns an empty list TBD"""
--- 103,116 ----
def dropDatabaseStatementsForConnectionDictionary(self, connectionDictionary, administrativeConnectionDictionary, dropUserFlag=0):
! """
! Returns an empty list, since there's no way to drop a database within
! sqlite. The only thing to do is to os.unlink() the database file.
!
! See also: SQLiteAdaptor.dropDatabaseWithAdministrativeConnectionDictionary
!
! See Modeling.interfaces.SchemaGeneration for details
! """
! return ()
def dropForeignKeyConstraintStatementsForRelationship(self, relationship):
"""returns an empty list TBD"""
|
|
From: <sbi...@us...> - 2003-08-02 08:39:21
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv12014/scripts
Modified Files:
mdl_generate_DB_schema.py
Log Message:
Fixed: when a model couldn't be loaded the error did not appear except with option '-v'
Index: mdl_generate_DB_schema.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/scripts/mdl_generate_DB_schema.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** mdl_generate_DB_schema.py 7 Jul 2003 14:57:14 -0000 1.4
--- mdl_generate_DB_schema.py 2 Aug 2003 08:39:18 -0000 1.5
***************
*** 86,90 ****
err('Create Database FAILED\nReason:')
err(tracebackInfoFromStack(sys.exc_traceback))
! if not continue_on_errors: print 'hgjh' ; return
else:
log(' OK')
--- 86,90 ----
err('Create Database FAILED\nReason:')
err(tracebackInfoFromStack(sys.exc_traceback))
! if not continue_on_errors: return
else:
log(' OK')
***************
*** 329,334 ****
raise RuntimeError, "Abnormal: got no exception but Model is None"
except Exception, exc:
! log("Serious: couldn't load the model")
! log(tracebackInfoFromStack(exc))
return 3
if user_connection_dict:
--- 329,334 ----
raise RuntimeError, "Abnormal: got no exception but Model is None"
except Exception, exc:
! err("Serious: couldn't load the model")
! err(tracebackInfoFromStack(exc))
return 3
if user_connection_dict:
***************
*** 342,345 ****
if __name__ == "__main__":
! errs = main(sys.argv)
! sys.exit(errs and 1 or 0)
--- 342,345 ----
if __name__ == "__main__":
! status = main(sys.argv)
! sys.exit(status or 0)
|
|
From: <sbi...@us...> - 2003-07-31 21:29:18
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests/testPackages/StoreEmployees
In directory sc8-pr-cvs1:/tmp/cvs-serv3699/Modeling/tests/testPackages/StoreEmployees
Modified Files:
pymodel_StoreEmployees.py
Log Message:
Simplified pymodel, now that Model.loadModel() automatically build() the PyModel on load
Index: pymodel_StoreEmployees.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/testPackages/StoreEmployees/pymodel_StoreEmployees.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** pymodel_StoreEmployees.py 25 Jul 2003 15:39:04 -0000 1.3
--- pymodel_StoreEmployees.py 31 Jul 2003 20:52:42 -0000 1.4
***************
*** 24,91 ****
##
! def pymodel():
! _connDict = {'database': 'STORE_EMPLOYEES'}
! model = Model('StoreEmployees',adaptorName='Postgresql',
! connDict=_connDict)
! model.doc = ' ... '
! model.version='0.1'
! model.entities = [
! #
! Entity('Store',
! properties=[ AString('corporateName', isRequired=1), ],
! ),
! Entity('Employee',
! properties=[ AString('lastName',isRequired=1,usedForLocking=1,
! width=20),
! AString('firstName', isRequired=1, width=50,
! usedForLocking=1),
! ]
! ),
! Entity('SalesClerk', parent='Employee',
! properties=[ AString('storeArea', width=20) ]
! ),
! Entity('Executive', parent='Employee',
! properties=[ AString('officeLocation', width=5) ]
! ),
! Entity('Address',
! properties=[ AString('street', width=80),
! AString('zipCode', width=10),
! AString('town'),
! ]
! ),
! Entity('Mark',
! properties=[ AInteger('month', isRequired=1),
! AInteger('mark', isRequired=1),
! ]
! ),
! Entity('Holidays',
! properties=[ ADateTime('startDate', isRequired=1),
! ADateTime('endDate', isRequired=1),
! ]
! ),
! ]
! model.associations=[
! Association('Mark', 'Executive',
! relations=['executive', 'marks'],
! delete=['nullify', 'cascade'],
! keys=['FK_Executive_id', 'id']),
! Association('Address', 'Employee',
! relations=['toEmployee', 'toAddresses'],
! delete=['deny', 'cascade'],
! keys=['fkEmployeeId', 'id'],
! ),
! Association('Employee', 'Store',
! relations=['toStore', 'employees'],
! delete=['nullify', 'deny'],
! keys=['fkStoreId', 'id']),
! Association('Holidays', 'Employee',
! relations=[None, 'holidays'],
! delete=[None, 'cascade'],
! keys=['fkEmployeeId', 'id']),
! ]
!
! model.build()
! return model
- def model():
- return pymodel().component
--- 24,85 ----
##
! _connDict = {'database': 'STORE_EMPLOYEES'}
! model = Model('StoreEmployees',adaptorName='Postgresql',
! connDict=_connDict)
! model.doc = ' ... '
! model.version='0.1'
! model.entities = [
! #
! Entity('Store',
! properties=[ AString('corporateName', isRequired=1), ],
! ),
! Entity('Employee',
! properties=[ AString('lastName',isRequired=1,usedForLocking=1,
! width=20),
! AString('firstName', isRequired=1, width=50,
! usedForLocking=1),
! ]
! ),
! Entity('SalesClerk', parent='Employee',
! properties=[ AString('storeArea', width=20) ]
! ),
! Entity('Executive', parent='Employee',
! properties=[ AString('officeLocation', width=5) ]
! ),
! Entity('Address',
! properties=[ AString('street', width=80),
! AString('zipCode', width=10),
! AString('town'),
! ]
! ),
! Entity('Mark',
! properties=[ AInteger('month', isRequired=1),
! AInteger('mark', isRequired=1),
! ]
! ),
! Entity('Holidays',
! properties=[ ADateTime('startDate', isRequired=1),
! ADateTime('endDate', isRequired=1),
! ]
! ),
! ]
! model.associations=[
! Association('Mark', 'Executive',
! relations=['executive', 'marks'],
! delete=['nullify', 'cascade'],
! keys=['FK_Executive_id', 'id']),
! Association('Address', 'Employee',
! relations=['toEmployee', 'toAddresses'],
! delete=['deny', 'cascade'],
! keys=['fkEmployeeId', 'id'],
! ),
! Association('Employee', 'Store',
! relations=['toStore', 'employees'],
! delete=['nullify', 'deny'],
! keys=['fkStoreId', 'id']),
! Association('Holidays', 'Employee',
! relations=[None, 'holidays'],
! delete=[None, 'cascade'],
! keys=['fkEmployeeId', 'id']),
! ]
|
|
From: <sbi...@us...> - 2003-07-31 21:14:52
|
Update of /cvsroot/modeling/ProjectModeling/Modeling
In directory sc8-pr-cvs1:/tmp/cvs-serv4507/Modeling
Modified Files:
CHANGES
Log Message:
Updated
Index: CHANGES
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/CHANGES,v
retrieving revision 1.138
retrieving revision 1.139
diff -C2 -d -r1.138 -r1.139
*** CHANGES 28 Jul 2003 11:00:30 -0000 1.138
--- CHANGES 31 Jul 2003 20:56:10 -0000 1.139
***************
*** 8,11 ****
--- 8,17 ----
--------------------------------------------------------
+ * Fixed MANIFEST.in and setup.py: the SQLite adaptor layer was omitted in
+ the source distribution! Thanks Mario for reporting.
+
+ * Model.loadModel() now automatically build() a pymodel, as suggested by
+ Mario <ma...@ru...>
+
0.9-pre-11 (2003/07/28)
-----------------------
|
|
From: <sbi...@us...> - 2003-07-31 21:10:48
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests/testPackages/AuthorBooks
In directory sc8-pr-cvs1:/tmp/cvs-serv4163/Modeling/tests/testPackages/AuthorBooks
Modified Files:
__init__.py
Log Message:
Changed: ready to accept pymodel as well
Index: __init__.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/testPackages/AuthorBooks/__init__.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** __init__.py 30 Jul 2002 15:38:54 -0000 1.1.1.1
--- __init__.py 31 Jul 2003 20:54:40 -0000 1.2
***************
*** 1,18 ****
# Load the model
! from Modeling import ModelSet
! import os, warnings, StringIO, traceback
! try:
! if ModelSet.defaultModelSet().modelNamed("AuthorBooks") is None:
! from os import getcwd, path
! mydir = os.path.abspath(os.path.dirname(__file__))
! xmlmodelPath=path.join(mydir,'model_AuthorBooks.xml')
! ModelSet.defaultModelSet().addModelFromXML({'file': xmlmodelPath})
! model=ModelSet.defaultModelSet().modelNamed('AuthorBooks')
! except:
! exc=StringIO.StringIO()
! traceback.print_exc(file=exc)
! warnings.warn("Couldn't load model 'model_AuthorBooks.xml'\nReason:\n%s"%exc.getvalue())
! del exc
! del os, warnings, StringIO, traceback
--- 1,14 ----
# Load the model
! from Modeling import ModelSet, Model
! if ModelSet.defaultModelSet().modelNamed("AuthorBooks") is None:
! import os
! mydir = os.path.abspath(os.path.dirname(__file__))
! model=Model.searchModel('AuthorBooks', mydir, verbose=0)
!
! if not model:
! import warnings
! warnings.warn("Couldn't load model 'AuthorBooks'")
! else:
! ModelSet.defaultModelSet().addModel(model)
|
|
From: <sbi...@us...> - 2003-07-31 21:06:40
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv5865
Modified Files:
README
Log Message:
Update README for tests, on behalf of Mario Ruggier who made the changes
Index: README
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/README,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** README 7 May 2003 11:27:10 -0000 1.8
--- README 31 Jul 2003 21:01:55 -0000 1.9
***************
*** 1,38 ****
# tests/README
Test the installation of the Modeling framework
- --------------------------------
! To test the installation, perform the following sequence of commands
! or manual operations:
! % cd <unpacked Modeling package>/Modeling/tests
! % python ./run.py # running with -h gives usage
! # Remaining tests require:
! # - that a PostgreSQL and/or MySQL database server is running somewhere
! # - you modify either ./Postgresql.cfg or MySQL.cfg to reflect you own
! # PostgreSQL/MySQL installation
! # - two different (***) databases (may be empty) with names: "AUTHOR_BOOKS" &
! # "STORE_EMPLOYEES"
! # Initialise(*)(**) EditingContext test db (uses model in
! # ./testPackages/AuthorBooks/model_AuthorBooks.xml):
! % python test_EditingContext_Global.py -r # initialise db
! % python test_EditingContext_Global.py # run tests
! % python test_EditingContext.py
! #- Initialise(*) Inheritance test db (uses model in
! # ./testPackages/StoreEmployees)
! % python test_EditingContext_Global_Inheritance.py -r # initialise db
! % python test_EditingContext_Global_Inheritance.py # run test
! # The last test requires 'test_EditingContext_Global.py -r', above
! % python test_AdaptorLayer.py # run test
! --
! (*) Note that, the first time this script is run on an empty database, it is
OK for the DROP statements to fail (but only the DROP statements), with
error messages similar to:
--- 1,45 ----
+ =============================================
# tests/README
Test the installation of the Modeling framework
! =============================================
! Pre-conditions:
! - a PostgreSQL or MySQL or SQLite database server must be running somewhere
! - you modify either ./Postgresql.cfg or MySQL.cfg SQLite.cfg to reflect your
! own database installation
! - two different[3] databases (may be empty) with names:
! "AUTHOR_BOOKS" & "STORE_EMPLOYEES"
! =============================================
! To run the tests:
! cd <unpacked Modeling package>/Modeling/tests
! python ./run.py # preliminary test (no db needed), -h for usage
+ # NOTE: the following three test_EditingContext_*.py testsuites
+ # accept a '-d' option to specify the database:
+ # '-d Postgresql' (default) (configuration: Postgresql.cfg)
+ # '-d MySQL', (configuration: MySQL.cfg)
+ # '-d SQLite'.
! python ./test_EditingContext_Global.py -r # init test db [1][2] (./testPackages/AuthorBooks)
! python ./test_EditingContext_Global.py
! python ./test_EditingContext.py
! python ./test_EditingContext_Global_Inheritance.py -r # init test db (./testPackages/StoreEmployees)
! python ./test_EditingContext_Global_Inheritance.py
! python ./test_EditingContext_ParentChild.py
!
! python ./test_AdaptorLayer.py # requires 'test_EditingContext_Global.py -r', above
!
! =============================================
! =============================================
! Notes:
!
! [1] Note that, the first time this script is run on an empty database, it is
OK for the DROP statements to fail (but only the DROP statements), with
error messages similar to:
***************
*** 41,52 ****
libpq.OperationalError:ERROR: sequence "pk_seq_writer" does not exist
! (**) For PostgreSQL versions >= 7.3, models that use the deprecated types of
! datetime and timespan will give an error -- the respectively equivalent
! types timestamp and interval should be used instead.
! (***) Quick hint:
! Postgresql:
! % psql template1
! template1=# CREATE DATABASE "AUTHOR_BOOKS";
! MySQL:
! % mysqladmin create "AUTHOR_BOOKS"
--- 48,61 ----
libpq.OperationalError:ERROR: sequence "pk_seq_writer" does not exist
! [2] For PostgreSQL versions >= 7.3, models that use the deprecated types of
! datetime and timespan will give an error -- the respectively equivalent
! types timestamp and interval should be used instead.
! [3] Quick hint:
! Postgresql:
! % psql template1
! template1=# CREATE DATABASE "AUTHOR_BOOKS";
! MySQL:
! % mysqladmin create "AUTHOR_BOOKS"
!
! =============================================
\ No newline at end of file
|
|
From: <sbi...@us...> - 2003-07-31 21:03:47
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests/testPackages/AuthorBooks
In directory sc8-pr-cvs1:/tmp/cvs-serv3997/Modeling/tests/testPackages/AuthorBooks
Modified Files:
Book.py
Log Message:
Added the necessary code to use FixedPoint for attribute price (code is commented but ready to be used)
Index: Book.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/testPackages/AuthorBooks/Book.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Book.py 23 Jul 2003 14:12:56 -0000 1.5
--- Book.py 31 Jul 2003 20:53:41 -0000 1.6
***************
*** 2,6 ****
--- 2,8 ----
from Modeling.CustomObject import CustomObject
from Modeling.Validation import ValidationException
+ #from fixedpoint import FixedPoint
+ #PRECISION=2
class Book (CustomObject):
***************
*** 21,25 ****
self._author=None
self._FK_Writer_Id=None
!
def entityName(self):
"Used by the framework to link this object to its entity"
--- 23,27 ----
self._author=None
self._FK_Writer_Id=None
!
def entityName(self):
"Used by the framework to link this object to its entity"
***************
*** 68,71 ****
--- 70,80 ----
self.willChange()
self._price = price
+ #self._price.precision=PRECISION
+
+ #def _setPrice(self, value):
+ # self._price = FixedPoint(value, PRECISION)
+ #
+ #def _getPrice(self):
+ # return str(self._price)
def validatePrice(self, value):
|
|
From: <sbi...@us...> - 2003-07-31 20:51:46
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide
In directory sc8-pr-cvs1:/tmp/cvs-serv3527/Modeling/doc/UserGuide
Modified Files:
DefiningaModel.tex
Log Message:
misc. / identation
Index: DefiningaModel.tex
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide/DefiningaModel.tex,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** DefiningaModel.tex 28 Jul 2003 07:08:00 -0000 1.13
--- DefiningaModel.tex 31 Jul 2003 20:51:43 -0000 1.14
***************
*** 136,151 ****
model.entities = [
Entity('Employee',
! properties = [
! AString('corporateName', isRequired=1),
! ]
),
Entity('SalesClerk', parent='Employee',
! properties = [ ... ]
),
Entity('Mark',
! properties = [ ... ]
)
Entity('Store',
! properties = [ ... ]
)
]
--- 136,151 ----
model.entities = [
Entity('Employee',
! properties = [
! AString('corporateName', isRequired=1),
! ]
),
Entity('SalesClerk', parent='Employee',
! properties = [ ... ]
),
Entity('Mark',
! properties = [ ... ]
)
Entity('Store',
! properties = [ ... ]
)
]
|
|
From: <sbi...@us...> - 2003-07-31 20:50:50
|
Update of /cvsroot/modeling/ProjectModeling In directory sc8-pr-cvs1:/tmp/cvs-serv3328 Modified Files: vertoo.data Log Message: Fixed date Index: vertoo.data =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/vertoo.data,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** vertoo.data 28 Jul 2003 11:04:20 -0000 1.4 --- vertoo.data 31 Jul 2003 20:50:46 -0000 1.5 *************** *** 1,2 **** ! mdl-code = major:0; minor:9; pre:11; release:x; date:Jun 28, 2003; ! mdl_doc = major:0; minor:9; pre:11; release:x; date:Jun 28, 2003; --- 1,2 ---- ! mdl-code = major:0; minor:9; pre:11; release:x; date:Jul 28, 2003; ! mdl_doc = major:0; minor:9; pre:11; release:x; date:Jul 28, 2003; \ No newline at end of file |
|
From: <sbi...@us...> - 2003-07-31 17:49:01
|
Update of /cvsroot/modeling/ProjectModeling/Modeling
In directory sc8-pr-cvs1:/tmp/cvs-serv28974
Modified Files:
Model.py
Log Message:
loadModel() now automatically build() the pymodel
Index: Model.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/Model.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** Model.py 24 Jul 2003 11:10:53 -0000 1.10
--- Model.py 31 Jul 2003 17:11:12 -0000 1.11
***************
*** 166,169 ****
--- 166,170 ----
import PyModel
if isinstance(model, PyModel.Model):
+ model.build()
model=model.component
updateModelWithCFG(model)
***************
*** 174,177 ****
--- 175,179 ----
if callable(pymodel):
pymodel=pymodel()
+ pymodel.build()
updateModelWithCFG(pymodel.component)
return pymodel.component
|
|
From: <sbi...@us...> - 2003-07-31 16:51:35
|
Update of /cvsroot/modeling/ProjectModeling In directory sc8-pr-cvs1:/tmp/cvs-serv22151 Modified Files: MANIFEST.in Log Message: Added missing SQLite.cfg and files in SQLiteAdaptorLayer Index: MANIFEST.in =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/MANIFEST.in,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** MANIFEST.in 9 Jul 2003 11:45:01 -0000 1.9 --- MANIFEST.in 31 Jul 2003 16:38:17 -0000 1.10 *************** *** 18,21 **** --- 18,22 ---- include Modeling/tests/Postgresql.cfg include Modeling/tests/MySQL.cfg + include Modeling/tests/SQLite.cfg recursive-include Modeling/tests/xmlmodels *.txt *.xml *************** *** 41,44 **** --- 42,49 ---- include Modeling/DatabaseAdaptors/MySQLAdaptorLayer/README include Modeling/DatabaseAdaptors/MySQLAdaptorLayer/TODO + + include Modeling/DatabaseAdaptors/SQLiteAdaptorLayer/COPYING + include Modeling/DatabaseAdaptors/SQLiteAdaptorLayer/README.txt + include Modeling/DatabaseAdaptors/SQLiteAdaptorLayer/TODO recursive-include Modeling/ModelMasons *.tmpl *.gif |
|
From: <sbi...@us...> - 2003-07-31 16:43:26
|
Update of /cvsroot/modeling/ProjectModeling
In directory sc8-pr-cvs1:/tmp/cvs-serv22287
Modified Files:
setup.py
Log Message:
Added forgotten module SQLiteAdaptorLayer. Ooops! Thnaks Mario for noticing
Index: setup.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/setup.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** setup.py 28 Jul 2003 11:00:29 -0000 1.28
--- setup.py 31 Jul 2003 16:39:07 -0000 1.29
***************
*** 61,64 ****
--- 61,65 ----
'Modeling.DatabaseAdaptors.PostgresqlAdaptorLayer',
'Modeling.DatabaseAdaptors.MySQLAdaptorLayer',
+ 'Modeling.DatabaseAdaptors.SQLiteAdaptorLayer',
],
long_description = long_description,
|
|
From: <sbi...@us...> - 2003-07-30 18:11:58
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide In directory sc8-pr-cvs1:/tmp/cvs-serv30583/doc/UserGuide Modified Files: FAQ.tex Log Message: added url pointing to snapshot_raw doc. for later use Index: FAQ.tex =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide/FAQ.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FAQ.tex 29 Jul 2003 18:44:17 -0000 1.3 --- FAQ.tex 30 Jul 2003 18:11:55 -0000 1.4 *************** *** 150,153 **** --- 150,155 ---- changes. Please refer to its documentation for full details. + %http://modeling.sourceforge.net/API/Modeling-API/public/Modeling.CustomObject.CustomObject-class.html#snapshot_raw + \end{description} |
|
From: <sbi...@us...> - 2003-07-30 18:11:12
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide
In directory sc8-pr-cvs1:/tmp/cvs-serv30456/doc/UserGuide
Modified Files:
EnvironmentVariables.tex
Log Message:
typo corrections
Index: EnvironmentVariables.tex
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide/EnvironmentVariables.tex,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** EnvironmentVariables.tex 24 Jul 2003 13:34:06 -0000 1.10
--- EnvironmentVariables.tex 30 Jul 2003 18:11:09 -0000 1.11
***************
*** 60,64 ****
as modifying the connection string, changing an attribute's external type,
adding a relationship, etc.), this shouldn't be enabled; if it is, the changes
! won't have any effect on the model themselves: e.g. you can set the conection
dictionary but \method{connectionDictionary()} will keep returning its initial
value. In such situations, you can either:
--- 60,64 ----
as modifying the connection string, changing an attribute's external type,
adding a relationship, etc.), this shouldn't be enabled; if it is, the changes
! won't have any effect on the model themselves: e.g. you can set the connection
dictionary but \method{connectionDictionary()} will keep returning its initial
value. In such situations, you can either:
***************
*** 80,84 ****
Note: The environment variable \code{MDL_DB_CONNECTIONS_CFG} is taken into
account to update a model's properties before it is cached, no particular
! action needs to be taken in this case.}
{e.g. '1', 'YES' (plus the empty string for de-activation)}
--- 80,84 ----
Note: The environment variable \code{MDL_DB_CONNECTIONS_CFG} is taken into
account to update a model's properties before it is cached, no particular
! action is needed in this case.}
{e.g. '1', 'YES' (plus the empty string for de-activation)}
|
|
From: <sbi...@us...> - 2003-07-30 17:17:38
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv20152
Modified Files:
test_AdaptorLayer.py
Log Message:
Forgot to include SQLite as a valid adaptor name
Index: test_AdaptorLayer.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_AdaptorLayer.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_AdaptorLayer.py 30 Jul 2003 17:14:36 -0000 1.2
--- test_AdaptorLayer.py 30 Jul 2003 17:17:36 -0000 1.3
***************
*** 124,128 ****
-h Prints this message
-p enables profiling
! -d sets the database adaptor to use: Postgresql (default) or MySQL
IMPORTANT: these tests requires that test_EditingContext_Global.py was
--- 124,128 ----
-h Prints this message
-p enables profiling
! -d sets the database adaptor to use: Postgresql (default), MySQL or SQLite
IMPORTANT: these tests requires that test_EditingContext_Global.py was
***************
*** 149,153 ****
if k=='-p': profile=1; continue
if k=='-d':
! if v not in ('Postgresql', 'MySQL'): usage(me); return 1
database_cfg='%s.cfg'%v
continue
--- 149,153 ----
if k=='-p': profile=1; continue
if k=='-d':
! if v not in ('Postgresql', 'MySQL', 'SQLite'): usage(me); return 1
database_cfg='%s.cfg'%v
continue
|
|
From: <sbi...@us...> - 2003-07-30 17:14:39
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv19571
Modified Files:
test_AdaptorLayer.py
Log Message:
Fixed: utils.parseConfigFile_and_updateModel() does not exist anymore, this func. is now implemented by Model.updateModelWithCFG()
Index: test_AdaptorLayer.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_AdaptorLayer.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_AdaptorLayer.py 20 Feb 2003 15:12:47 -0000 1.1
--- test_AdaptorLayer.py 30 Jul 2003 17:14:36 -0000 1.2
***************
*** 34,42 ****
import unittest, sys
import utils
- from utils import parseConfigFile_and_updateModel
if __name__ == "__main__":
utils.fixpath()
! from Modeling import ModelSet
from Modeling.EditingContext import EditingContext
from Modeling.FetchSpecification import FetchSpecification
--- 34,41 ----
import unittest, sys
import utils
if __name__ == "__main__":
utils.fixpath()
! from Modeling import ModelSet, Model
from Modeling.EditingContext import EditingContext
from Modeling.FetchSpecification import FetchSpecification
***************
*** 135,139 ****
verbose=0
! databaseAdaptorName='Postgresql'
def main(args):
--- 134,138 ----
verbose=0
! database_cfg='Postgresql.cfg'
def main(args):
***************
*** 141,145 ****
import getopt
options, args = getopt.getopt(sys.argv[1:], 'vVpd:')
! global verbose, databaseAdaptorName
profile=0
--- 140,144 ----
import getopt
options, args = getopt.getopt(sys.argv[1:], 'vVpd:')
! global verbose, database_cfg
profile=0
***************
*** 151,155 ****
if k=='-d':
if v not in ('Postgresql', 'MySQL'): usage(me); return 1
! databaseAdaptorName=v
continue
--- 150,154 ----
if k=='-d':
if v not in ('Postgresql', 'MySQL'): usage(me); return 1
! database_cfg='%s.cfg'%v
continue
***************
*** 157,164 ****
author_books_model=ModelSet.defaultModelSet().modelNamed('AuthorBooks')
! parseConfigFile_and_updateModel(author_books_model, databaseAdaptorName)
# MySQL specifics: change TIMESTAMP to DATETIME
! if databaseAdaptorName=='MySQL':
author_books_model.entityNamed('Writer').attributeNamed('birthday').setExternalType('DATETIME')
--- 156,163 ----
author_books_model=ModelSet.defaultModelSet().modelNamed('AuthorBooks')
! Model.updateModelWithCFG(author_books_model, database_cfg)
# MySQL specifics: change TIMESTAMP to DATETIME
! if database_cfg=='MySQL.cfg':
author_books_model.entityNamed('Writer').attributeNamed('birthday').setExternalType('DATETIME')
|
|
From: <sbi...@us...> - 2003-07-29 21:43:44
|
Update of /cvsroot/modeling/ProjectModeling/Modeling
In directory sc8-pr-cvs1:/tmp/cvs-serv6026
Modified Files:
CustomObject.py
Log Message:
Added full documentation for snapshot_raw(), including the special case where a fk value can get out-of-sync
Index: CustomObject.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/CustomObject.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** CustomObject.py 28 Jul 2003 06:20:19 -0000 1.16
--- CustomObject.py 29 Jul 2003 18:42:13 -0000 1.17
***************
*** 296,299 ****
--- 296,331 ----
keys are allAttributesKeys() with their corresponding values.
+ Special care should be taken when examining the values for primary keys
+ and foreign keys:
+
+ - if your object and all its related objects are already saved in the
+ database, you'll get the PK's and FKs' values, as expected (a special
+ case exists where a FK value can get out-of-sync, see below)
+
+ - if your object is inserted in an EditingContext but has not been saved
+ yet, the PK value will be its TemporaryGlobalID, since there is no way
+ to know the value it will get when it is saved,
+
+ - if your object has a to-one relationship to an other object that is
+ inserted in an EditingContext but not saved yet, the FK's value will
+ be that related object's TemporaryGlobalID --for the same reason then
+ above.
+
+ - Last, if the object's entity defines a foreign key involved in a
+ to-many relationship pointing to it but with no inverse (i.e. self's
+ entity has no to-one relationship using this foreign key), the
+ returned value will its value stored in the Database's cache managed
+ by the framework. In other words, this value will be exact after each
+ saveChanges(), and the first time the object is fetched; afterwards,
+ if the object on the other side modifies its relation pointing to
+ 'self' (e.g. removes it), the value will be out-of-sync with the
+ object graph and will remain as-is until the EditingContext saves its
+ changes again.
+
+ Note: this method does not care about PKs or FKs being marked as class
+ properties. Even when they are class properties, it does NOT look at their
+ values, instead the returned values are extracted by examining the objects
+ related to 'self'.
+
Raises ObjectNotRegisteredError if the object itself is not registered in
an EditingContext, or if any of the objects it is in relation w/ is not
|
|
From: <sbi...@us...> - 2003-07-29 21:43:42
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide
In directory sc8-pr-cvs1:/tmp/cvs-serv6376/doc/UserGuide
Modified Files:
FAQ.tex
Log Message:
Splitted the FAQ entry for accessing PK/FK values in objects
Index: FAQ.tex
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide/FAQ.tex,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** FAQ.tex 4 Jul 2003 17:02:45 -0000 1.2
--- FAQ.tex 29 Jul 2003 18:44:17 -0000 1.3
***************
*** 25,29 ****
! \item[What if I want to see the primary key/foreign key values in my objects?]
\begin{description}
--- 25,29 ----
! \item[What if I want to see the primary key values in my objects?]
\begin{description}
***************
*** 44,53 ****
\end{itemize}
\item[Accessing it at run-time]
! However, there's a cleaner alternative to this: the primary key value can
! always be retrieved from your objects, without requiring it to be a class
! property. You can access it with \method{globalID}; every single object
! managed by the framework is uniquely identified by its global id. Among other
! things, this one has a dictionary holding the PK values:
\begin{verbatim}
--- 44,62 ----
\end{itemize}
+ \item[Using \method{CustomObject.snapshot_raw()}]
+
+ This method is the best way to get the values that will be stored for an
+ object at a given state in the database when changes are saved. It returns a
+ dictionary from which the value of the primary key can be retrieved. Be sure
+ to carefully read its documentation before using it.
+
+ This method does not require that the primary key is made a class property.
+
\item[Accessing it at run-time]
! There's a third alternative: the primary key value can always be retrieved
! from your objects, without requiring it to be a class property and apart from
! \method{snapshot_raw()}. You can access it with \method{globalID}; every
! single object managed by the framework is uniquely identified by its global
! id. Among other things, this one has a dictionary holding the PK values:
\begin{verbatim}
***************
*** 62,66 ****
def pk(self):
"Returns the pk's value"
! return self.globalID() and object.globalID()['id'] or None
\end{verbatim}
--- 71,82 ----
def pk(self):
"Returns the pk's value"
! gid=self.globalID()
! if not gid:
! return None
! if gid.isTemporary():
! # temporary gid: object has been inserted but not saved yet.
! # Change this to return any value you find more appropriate
! return gid
! return gid.keyValues()['id']
\end{verbatim}
***************
*** 68,71 ****
--- 84,153 ----
has just been inserted into an \class{EditingContext} but has not been saved
yet.
+ \end{description}
+
+ \item[What if I want to see the foreign key values in my objects?]
+
+ As a general rule, foreign keys should not be made class properties; this is
+ an even stricter rule than the one for primary keys, because the framework
+ {\em does not update foreign keys values} in objects that define them as class
+ properties (but of course, they will saved as expected in the database).
+
+ The reason is that a foreign key is usually used to store the piece of
+ information needed to store in the database a to-one relationship at the
+ object level. Say you have an entity, \code{Writer} related with the entity
+ \code{Book} in a one-to-many relationship; the table for entity \code{Book}
+ stores the primary key value for the corresponding \code{Writer} in a foreign
+ key \code{FK_Writer_id}. Suppose now that a book is moved from one author to
+ another: at the object-level, the book is removed to one author's set of books
+ and added to the others, while the book itself gets a new author:
+ \begin{verbatim}
+ >>> writer1.removeFromBooks(book)
+ >>> book.setAuthor(writer2)
+ >>> writer2.addToBooks(book)
+ \end{verbatim}
+
+ If the foreign key \code{Book.FK_Writer_id} is a class property, it is now out
+ of sync with the book's author, because it stores the former author's id while
+ it has been assigned to an other one.
+
+ However, there are several alternate solutions for accessing a foreign key
+ value, if you really insist on doing this:
+ \begin{description}
+ \item[Using CustomObject.snapshot_raw()]
+ This particular method was especially design for that purpose, as it returns
+ the raw data that do/will represent the corresponding database row. As far
+ as foreign keys are concerned, it tries everything possible to return a
+ foreign key value reflecting the current state of the graph of object. There
+ are, however, situations where the returned value can get out-of-sync;
+ please refer to the documentation of \code{CustomObject.snapshot_raw()} for
+ details.
+
+ \item[Explicitely extracting the related objects's primary key]
+
+ You can also do it manually, by traversing the relationship to get its primary
+ key, for example by adding such a method to your \code{Book}:
+ \begin{verbatim}
+ def getFKWriterId(self):
+ if self.getWriter() is None:
+ return None
+ else:
+ w_gid=self.getWriter().globalID()
+ if w_gid.isTemporary():
+ # temporary gid: object has been inserted but not saved yet.
+ # Change this to return any value you find more appropriate
+ return w_gid
+ else:
+ return w_gid.keyValues()
+ \end{verbatim}
+ This code is, in fact, the relevant part of the code of
+ \method{CustomObject.snapshot_raw()}. It's exposed here so that you can
+ see the different cases that can happen. Of course, it assumes that a to-one
+ relationship for this foreign key is defined in the object's entity --if the
+ FK is only involved in an other entity's to-many relationship with no inverse,
+ there's little to do, except relying on
+ \method{CustomObject.snapshot_raw()} (see above) that can also retrieve the
+ correct FK value after the first fetch, and after the EditingContext saved its
+ changes. Please refer to its documentation for full details.
+
\end{description}
|
|
From: <sbi...@us...> - 2003-07-28 18:27:38
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/doc/HomePage
In directory sc8-pr-cvs1:/tmp/cvs-serv29388/Modeling/doc/HomePage
Modified Files:
main.tex
Log Message:
Fixed date: July, not June (thanks Mario ;)
Index: main.tex
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/HomePage/main.tex,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** main.tex 28 Jul 2003 11:00:30 -0000 1.20
--- main.tex 28 Jul 2003 18:27:36 -0000 1.21
***************
*** 13,17 ****
\author{S\'ebastien Bigaret}
\email{sbi...@us...}
! \date{Jun 28, 2003}
%\date{\today}
--- 13,17 ----
\author{S\'ebastien Bigaret}
\email{sbi...@us...}
! \date{Jul 28, 2003}
%\date{\today}
|
|
From: <sbi...@us...> - 2003-07-28 18:27:38
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv29388/Modeling/doc
Modified Files:
UserGuide.tex
Log Message:
Fixed date: July, not June (thanks Mario ;)
Index: UserGuide.tex
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/UserGuide.tex,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** UserGuide.tex 28 Jul 2003 11:00:30 -0000 1.25
--- UserGuide.tex 28 Jul 2003 18:27:35 -0000 1.26
***************
*** 12,16 ****
% the rest is at your discretion.
\authoraddress{Email: \email{sbi...@us...}}
! \date{Jun 28, 2003}
%\date{\today}
\release{0.9-pre-11}
--- 12,16 ----
% the rest is at your discretion.
\authoraddress{Email: \email{sbi...@us...}}
! \date{Jul 28, 2003}
%\date{\today}
\release{0.9-pre-11}
|
|
From: <sbi...@us...> - 2003-07-28 11:04:24
|
Update of /cvsroot/modeling/ProjectModeling
In directory sc8-pr-cvs1:/tmp/cvs-serv17478
Modified Files:
vertoo.data vertoo.config
Log Message:
Release 0.9pre11
Index: vertoo.data
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/vertoo.data,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** vertoo.data 21 Jul 2003 08:54:44 -0000 1.3
--- vertoo.data 28 Jul 2003 11:04:20 -0000 1.4
***************
*** 1 ****
! Modeling = major:0; minor:9; pre:10; release:x; date:Jun 18, 2003;
\ No newline at end of file
--- 1,2 ----
! mdl-code = major:0; minor:9; pre:11; release:x; date:Jun 28, 2003;
! mdl_doc = major:0; minor:9; pre:11; release:x; date:Jun 28, 2003;
Index: vertoo.config
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/vertoo.config,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** vertoo.config 4 Jul 2003 17:07:45 -0000 1.1
--- vertoo.config 28 Jul 2003 11:04:20 -0000 1.2
***************
*** 9,18 ****
#registry.registerScheme('full', '%major.%minor%[release?.%release:]')
! MDL = ModuleInfo('Modeling', [
FileInfo("setup.py",
[ AnchorInfo('simple', 1,
arguments(pattern="version=%Q", format='@full')),
]),
FileInfo("Modeling/CHANGES",
[ AnchorInfo('simple', 1,
--- 9,48 ----
#registry.registerScheme('full', '%major.%minor%[release?.%release:]')
+ # %@. expands to module name
+ scmTool = ScmToolInfo(
+ tool="cvs",
+ commitmsg="Update version to @+",
+ tagfmt="Prj-@full",
+ )
! MDL_code = ModuleInfo('mdl-code', [
FileInfo("setup.py",
[ AnchorInfo('simple', 1,
arguments(pattern="version=%Q", format='@full')),
]),
+ #FileInfo("Modeling/CHANGES",
+ # [ AnchorInfo('simple', 1,
+ # arguments(pattern="is: %v", format='@full')),
+ # ]),
+ #FileInfo([ "Modeling/doc/UserGuide.tex",
+ # "Modeling/doc/HomePage/main.tex",
+ # "Modeling/doc/Tutorial.tex" ],
+ # [ AnchorInfo('simple', 1,
+ # arguments(pattern=r"\release{%v}", format='@full')),
+ # AnchorInfo('simple', 1,
+ # arguments(pattern=r"\setshortversion{%v}", format='@short_pre')),
+ # AnchorInfo('simple', 1,
+ # arguments(pattern=r"\date{%v}", format='@date')),
+ # ]),
+ #FileInfo("Modeling/doc/HomePage/downloads.tex",
+ # [ AnchorInfo('simple', 1,
+ # arguments(pattern="Current version: %v", format='@full')),
+ # ]),
+ ])
+ MDL_doc = ModuleInfo('mdl_doc', [
+ #FileInfo("setup.py",
+ # [ AnchorInfo('simple', 1,
+ # arguments(pattern="version=%Q", format='@full')),
+ # ]),
FileInfo("Modeling/CHANGES",
[ AnchorInfo('simple', 1,
***************
*** 33,62 ****
arguments(pattern="Current version: %v", format='@full')),
]),
-
-
- # FileInfo("ReadMe.txt", [
- # AnchorInfo('simple', 1,
- # arguments(pattern="Vertoo %v", format="@public")),
- # ]),
- # FileInfo("setup.py", [
- # AnchorInfo('simple', 1,
- # arguments(pattern="version=%q", format="@public")),
- # ]),
- # FileInfo("setup.cfg", [
- # AnchorInfo('simple', 1,
- # arguments(pattern="release = %v",
- # format="%[release?%release:1]")),
- # ]),
- # FileInfo("admin/release-source-tarball.sh", [
- # AnchorInfo('simple', 1,
- # arguments(pattern="vertoo-%v", format="@public")),
- # ]),
- # FileInfo("Makefile", [
- # AnchorInfo('simple', 1,
- # arguments(pattern="vertoo-%v", format="@public")),
- # ]),
])
! modules = [MDL]
# vim:set ft=python fdm=manual:
--- 63,69 ----
arguments(pattern="Current version: %v", format='@full')),
]),
])
! modules = [MDL_code, MDL_doc]
# vim:set ft=python fdm=manual:
|
|
From: <sbi...@us...> - 2003-07-28 11:00:33
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/doc/HomePage
In directory sc8-pr-cvs1:/tmp/cvs-serv16682/Modeling/doc/HomePage
Modified Files:
main.tex downloads.tex
Log Message:
Release 0.9pre11
Index: main.tex
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/HomePage/main.tex,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** main.tex 18 Jul 2003 15:01:13 -0000 1.19
--- main.tex 28 Jul 2003 11:00:30 -0000 1.20
***************
*** 7,11 ****
% Increment the release number whenever significant changes are made.
% The author and/or editor can define 'significant' however they like.
! %\release{0.9-pre-10}
% At minimum, give your name and an email address. You can include a
--- 7,11 ----
% Increment the release number whenever significant changes are made.
% The author and/or editor can define 'significant' however they like.
! %\release{0.9-pre-11}
% At minimum, give your name and an email address. You can include a
***************
*** 13,17 ****
\author{S\'ebastien Bigaret}
\email{sbi...@us...}
! \date{Jun 18, 2003}
%\date{\today}
--- 13,17 ----
\author{S\'ebastien Bigaret}
\email{sbi...@us...}
! \date{Jun 28, 2003}
%\date{\today}
Index: downloads.tex
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/doc/HomePage/downloads.tex,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** downloads.tex 18 Jul 2003 15:01:13 -0000 1.12
--- downloads.tex 28 Jul 2003 11:00:30 -0000 1.13
***************
*** 10,14 ****
\begin{enumerate}
! \item[\bf Current version: 0.9-pre-10]
Download it here:\begin{rawhtml}<a
--- 10,14 ----
\begin{enumerate}
! \item[\bf Current version: 0.9-pre-11]
Download it here:\begin{rawhtml}<a
|