[Checkins] SVN: z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/ Updated files to reflect engine-metadata bugfixes. Fixed a minor bug in demo_3 that crept in while making engine-related changes. demo_3 and demo_4 are now broken (looks like a RelationalDC is never created), apparently due to some change in transaction management.

Michael Bernstein webmaven at cox.net
Sat Jan 20 06:51:13 EST 2007


Log message for revision 72121:
  Updated files to reflect engine-metadata bugfixes. Fixed a minor bug in demo_3 that crept in while making engine-related changes. demo_3 and demo_4 are now broken (looks like a RelationalDC is never created), apparently due to some change in transaction management.
  M    zalchemy/demo/TODO.txt
  M    zalchemy/demo/demo_3/message.py
  M    zalchemy/demo/README.txt
  

Changed:
  U   z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/README.txt
  U   z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/TODO.txt
  U   z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_3/message.py

-=-
Modified: z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/README.txt
===================================================================
--- z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/README.txt	2007-01-20 10:40:03 UTC (rev 72120)
+++ z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/README.txt	2007-01-20 11:51:12 UTC (rev 72121)
@@ -4,13 +4,8 @@
 These demos show how ZAlchemy can be used to create Zope3 web applications that use SQLAlchemy to persist data in an RDBMS.
 
 To try a demo, copy the included z3c.zalchemy.demo-configure.zcml file to your 
-etc/package-includes/ directory and uncomment the demo you want to try.
+etc/package-includes/ directory and uncomment the demos you want to try.
 
-Note: Do not try installing more than one of these demos at the same time. Due 
-to a minor bug (hopefully soon eradicated), if ZAlchemy tries to create tables 
-with the same name in different databases it produces an error (because of the
-way the global MetaData() is used as an intermediary).
-
 Because of incompatibilities between the database schemas, each demo defines a 
 different database connection string, to avoid conflicts.
 
@@ -18,9 +13,9 @@
 is the number of the demo.  So for example, if you've uncommented demo_3 from
 z3c.zalchemy.demo-configure.zcml, restarting Zope should show a 
 'Message Container 3' object that can be added. Inside these message containers 
-message objects can be added and edited. Adding a second 'Message Container' 
-will show the same set of messages, as the container just gets all messages in 
-the database.
+'Message X' objects can be added and edited. Adding a second
+'Message Container X' will show the same set of messages, as the container just 
+gets all messages in the database.
 
 
 Demo 1: Subclasses the included SQLAlchemyContainer to create a container that

Modified: z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/TODO.txt
===================================================================
--- z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/TODO.txt	2007-01-20 10:40:03 UTC (rev 72120)
+++ z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/TODO.txt	2007-01-20 11:51:12 UTC (rev 72121)
@@ -6,6 +6,8 @@
    uses the global_connection to pass around the table object to be bound to an 
    engine, but doesn't seem to ever clean up the tables after it is done).
    
+ * fix the RelationalDC implementation in dem_3 and demo_4
+ 
  * add tests to the demos
 
  * copy/paste of fragments between messages (in demo_4) ends up doing a

Modified: z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_3/message.py
===================================================================
--- z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_3/message.py	2007-01-20 10:40:03 UTC (rev 72120)
+++ z3c.zalchemy/branches/engine-metadata/src/z3c/zalchemy/demo/demo_3/message.py	2007-01-20 11:51:12 UTC (rev 72121)
@@ -16,7 +16,7 @@
 # Define and create the table for storing dublin core metadata
 RelationalDCTable = sqlalchemy.Table(
         'dublin_core',
-        z3c.zalchemy.metadata('Demo-Engine-3'),
+        z3c.zalchemy.metadata('DemoEngine-3'),
         sqlalchemy.Column('id', sqlalchemy.Integer,
                            sqlalchemy.Sequence('metadata_seq'),
                            primary_key = True),
@@ -121,7 +121,7 @@
 
     who = FieldProperty(IHelloWorldMessage3['who'])
     
-    # instantiate a RelationaDC object to get an id
+    # instantiate a RelationalDC object to get an id
     # (the metadata.id column autoincrements)
     def __init__(self, title, description, who):
         self.rdc = RelationalDC(title, description)



More information about the Checkins mailing list