Hello ,

I've built a database with Postgres and some ideas taken from the vertical 
tables example, and I stumbled on two problems that I think could be bugs
In my code I need to get all row IDs from new/mod/del objects, so I added an 
extension working out objects attached to a session

When I perform flush(), I get this dump:

Traceback (most recent call last):
  File "importMonitor.py", line 209, in run
    self.importDyeMagic.check()
  File "importMonitor.py", line 190, in check
    fun(funData)
  File "/home/stefano/documenti/projects/sqlalchemy/importFunctions.py", line 
48, in _sqlalchemyWrapper
    result = fn(*args, **kwargs)
  File "/home/stefano/documenti/projects/sqlalchemy/importFunctions.py", line 
637, in importDdtGreggi
    importMagazzinoGreggi(__ddtCliente ,**kwargs)
  File "/home/stefano/documenti/projects/sqlalchemy/importFunctions.py", line 
685, in importMagazzinoGreggi
    importArticoli(articoli, **kwargs)
  File "/home/stefano/documenti/projects/sqlalchemy/importFunctions.py", line 
49, in _sqlalchemyWrapper
    session.flush()
  File 
"/usr/lib/python2.5/site-packages/SQLAlchemy-0.4.2b-py2.5.egg/sqlalchemy/orm/scoping.py",
 line 74, in do
    return getattr(self.registry(), name)(*args, **kwargs)
  File 
"/usr/lib/python2.5/site-packages/SQLAlchemy-0.4.2b-py2.5.egg/sqlalchemy/orm/session.py",
 line 693, in flush
    self.uow.flush(self, objects)
  File 
"/usr/lib/python2.5/site-packages/SQLAlchemy-0.4.2b-py2.5.egg/sqlalchemy/orm/unitofwork.py",
 line 184, in flush
    session.extension.before_flush(session, flush_context, objects)
  File "/home/stefano/documenti/projects/sqlalchemy/databaseExtension.py", line 
115, in before_flush
    self.changes.storeInfo(session)
  File "/home/stefano/documenti/projects/sqlalchemy/databaseExtension.py", line 
25, in storeInfo
    operations = {"INS":session.new, "MOD":session.dirty, "DEL":session.deleted}
  File 
"/usr/lib/python2.5/site-packages/SQLAlchemy-0.4.2b-py2.5.egg/sqlalchemy/orm/session.py",
 line 1102, in dirty
    return self.uow.locate_dirty()
  File 
"/usr/lib/python2.5/site-packages/SQLAlchemy-0.4.2b-py2.5.egg/sqlalchemy/orm/unitofwork.py",
 line 161, in locate_dirty
    or (x.__class__._class_state.has_mutable_scalars and x.state.is_modified())
AttributeError: '_valore' object has no attribute 'state'

I've checked the source and to me end of line 161 should be "and 
x._state.is_modified())"

Please advise, thanks

-- 
Cordialmente

Stefano Bartaletti
Responsabile Software

G.Tosi Spa Tintoria

Skype account: stefano.bartaletti
ICQ contact  : 1271960

Viale dell'Industria 61
21052 Busto Arsizio (VA)

Tel. +39 0331 34 48 11
Fax  +39 0331 35 21 23 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to