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
;
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
(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
.
--
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
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
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
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
= 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
:
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
, 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
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
-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
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
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
'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
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
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
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
18 matches
Mail list logo