Hi,

I'm using MiddleKit in a non-web environment as a O-R mapper. It's idea is 
quite good, but I have two small problems:

1. The links between two tables get screwed up. Say I have a FooType table.
        ft = FooType()
        ft.setDescription("Weird")
Then I create an instance of Bar which has a field type: FooType. This should 
work, right?
        b = Bar()
        b.setType(ft)

For some reason, b.type becomes a value which has no relation whatsoever to a 
FooType record.

2. If I create a lot of instances, and I try to connect them, I run into 
problems with MySQL:
% ./main.py /var/log/messages
/var/log/messages had 2656 lines
Traceback (most recent call last):
  File "./main.py", line 69, in ?
    sys.exit(main())
  File "./main.py", line 65, in main
    store.saveChanges()
  File "./MiddleKit/Run/ObjectStore.py", line 266, in saveChanges
  File "./MiddleKit/Run/SQLObjectStore.py", line 166, in commitInserts
  File "./MiddleKit/Run/SQLObjectStore.py", line 179, in _insertObject
  File "./MiddleKit/Run/SQLObjectStore.py", line 311, in executeSQL
  File "./MiddleKit/Run/SQLObjectStore.py", line 341, in connectionAndCursor
  File "./MiddleKit/Run/MySQLObjectStore.py", line 33, in newConnection
  File "/usr/lib/python2.1/site-packages/MySQLdb/__init__.py", line 63, in 
Connect
    return apply(Connection, args, kwargs)
  File "/usr/lib/python2.1/site-packages/MySQLdb/connections.py", line 67, in 
__init__
    self._db = apply(connect, args, kwargs2)
_mysql_exceptions.OperationalError: (1040, 'Too many connections')

What is going on, am I doing something wrong?

Background info: 
OS: Linux
DB: Mysql 3.23.33
Python: 2.1.1

Thanx for your time
EJ

_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to