[sqlalchemy] Re: PostgreSQL - fetching boolean type gives integer type

2006-12-22 Thread Alan Franzoni
as integer, but needs a boolean to be re-inserted. In my example, I just showed that bool values in my own system *are* returned as bool. It'd be nice now to know from Sanjay which system version is using. -- Alan Franzoni [EMAIL PROTECTED] - Togli .xyz dalla mia email per contattarmi. Remove .xyz

[sqlalchemy] Re: PostgreSQL - fetching boolean type gives integer type

2006-12-22 Thread Alan Franzoni
; any active development is done on release 2.x only right now. -- Alan Franzoni [EMAIL PROTECTED] - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerprint (Key ID = FE068F3E): 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E

[sqlalchemy] SessionTransaction behaviour

2006-12-22 Thread Alan Franzoni
(Reparto).get_by(id=2) print item1.rep_descrizione, item2.rep_descrizione #end sa_example.py But then I don't understand what SessionTransaction is there for? -- Alan Franzoni [EMAIL PROTECTED] - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key

[sqlalchemy] Re: SqlSoup error

2006-12-22 Thread Alan Franzoni
. -- Alan Franzoni [EMAIL PROTECTED] - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerprint (Key ID = FE068F3E): 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E --~--~-~--~~~---~--~~ You received

[sqlalchemy] Re: PostgreSQL - fetching boolean type gives integer type

2006-12-21 Thread Alan Franzoni
Remember this is not a wiki! {{{}}} won't format the code as you might expect. BTW, everything ok here on pgsql; boolean are True or False. You should try posting at least your db metadata and tell us which version of pgsql and psycopg you're using. -- Alan Franzoni [EMAIL PROTECTED] - Togli

[sqlalchemy] Re: problem with backref

2006-12-21 Thread Alan Franzoni
A better solution is to do sess = object_session(self) That's wonderful and I didn't know about it! Finally I'll give up passing session around my code! Thanks! -- Alan Franzoni [EMAIL PROTECTED] - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact

[sqlalchemy] Re: PostgreSQL - fetching boolean type gives integer type

2006-12-21 Thread Alan Franzoni
e.prova, type(e.prova) Result: True type 'bool' -- Alan Franzoni [EMAIL PROTECTED] - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerprint (Key ID = FE068F3E): 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E

[sqlalchemy] Re: problem with backref

2006-12-20 Thread Alan Franzoni
= create_session() o = A('1', '2') o.b = B(o.x, o.y, '3') sess.save(o) sess.flush() sess.expunge(o) sess.clear() del o o = sess.query(A).get_by(x=1, y=2) print o.b.z sess.delete(o.b) sess.flush() sess.close() print o.b s = a.select() print s.execute().fetchall() -- Alan Franzoni [EMAIL

[sqlalchemy] Re: problem with backref

2006-12-20 Thread Alan Franzoni
: self.b = B(...) else: session.delete(self.b) -- Alan Franzoni [EMAIL PROTECTED] - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerprint (Key ID = FE068F3E): 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E

[sqlalchemy] Re: single Session, queries against multiple classes issues

2006-12-19 Thread Alan Franzoni
, bases, classdict) has been called, hence the class has been already constructed normally. Everything else works fine: manytoone properties are assigned correctly and they work fine. I'm now starting a debugging session and I will provide more info ASAP. -- Alan Franzoni [EMAIL PROTECTED

[sqlalchemy] Re: Misunderstanding something with autoloading

2006-12-19 Thread Alan Franzoni
if either SQLAlchemy or psycopg2 are well-tested against it. You could try another DB-adapter as well. -- Alan Franzoni [EMAIL PROTECTED] - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerprint (Key ID = FE068F3E): 5C77 9DC3 BD5B 3A28

[sqlalchemy] Re: single Session, queries against multiple classes issues

2006-12-19 Thread Alan Franzoni
-instance basis; this behaviour seems to interfere with instance loading at some point. I'm writing a test case to let you see the problem; in the meantime, have converted what stayed in my __init__ to be done in __new__. -- Alan Franzoni [EMAIL PROTECTED] - Togli .xyz dalla mia email per contattarmi

[sqlalchemy] MapperExtension calling __init__ and many-to-many relations problem

2006-12-19 Thread Alan Franzoni
override) restores full software functionality. I couldn't understand what's the problem - just to let you know, my software worked 100% until i reached this many-to-many relations part - manytoone and onetomany work fine. -- Alan Franzoni [EMAIL PROTECTED] - Togli .xyz dalla mia email per contattarmi

[sqlalchemy] single Session, queries against multiple classes issues

2006-12-18 Thread Alan Franzoni
queries seem to get actually executed, and they look the same when commenting out the code and when having all the code run. -- Alan Franzoni [EMAIL PROTECTED] - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerprint (Key ID = FE068F3E

[sqlalchemy] Re: python ORM

2006-12-16 Thread Alan Franzoni
'place_id' it will point (for sure!) at the place.idcolumn, and that class will have a 'place' property. Try it out, you'll find amazing how easy it's to write such code. -- Alan Franzoni [EMAIL PROTECTED] - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me

[sqlalchemy] Re: Proposal: session identity_map no longer weak referencing

2006-12-09 Thread Alan Franzoni
the strongly referenced behaviour is OK. If it's in a session, I want an object to be tracked whatsoever, unless I explicitly remove it. -- Alan Franzoni [EMAIL PROTECTED] - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerprint (Key ID

[sqlalchemy] Re: ORM and metaclasses init problem

2006-12-09 Thread Alan Franzoni
of 'not forcing any kind of programming style'. Thank you anyway! -- Alan Franzoni [EMAIL PROTECTED] - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerprint (Key ID = FE068F3E): 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E

[sqlalchemy] Re: Changing/Extending mapped objects' properties

2006-10-30 Thread Alan Franzoni
was that the mapper would just have read that values from the class and used them to properly 'instruct' the ExtProperty I wanted to use.BTW, the solution you found seems to be the best and has no shortcomings, so I'll take that route. Thank you for both your help and sqlalchemy itself :-)-- Alan Franzoni [EMAIL