On Jul 24, 2010, at 5:40 PM, Nikolaj wrote:
> I'm having trouble inheriting a synonym property from a mixin class.
> It obviously works if the call to synonym() is on the child class and
> just the get/set methods are left on the mixin. Here is an example:
>
>
> from sqlalchemy import create_en
Hello all,
I've made some modifications to the directed graph[1] example, of
primary interest to this email being the introduction Manufacturer
objects which act as owners of Nodes. My desire is to cascade the
deletion of a Manufacturer down to every Node and Edge, even if the
side of one Edge is
I'm having trouble inheriting a synonym property from a mixin class.
It obviously works if the call to synonym() is on the child class and
just the get/set methods are left on the mixin. Here is an example:
from sqlalchemy import create_engine, Column, ForeignKey
from sqlalchemy.ext.declarative i
On Sat, 2010-07-24 at 08:06 -0700, manman wrote:
> new_a=A()
> session.begin()
> session.add(new_a)
> session.flush()
> new_b=B()
> new_b.a_id=new_a.id
> session.add(new_b)
>
> try:
> session.commit()
> except:
> session.rollback()
> raise
>
> this code is right? when error all be rollback
new_a=A()
session.begin()
session.add(new_a)
session.flush()
new_b=B()
new_b.a_id=new_a.id
session.add(new_b)
try:
session.commit()
except:
session.rollback()
raise
this code is right? when error all be rollback?
--
You received this message because you are subscribed to the Google Groups
"flush" is not "commit". After a flush, you can still rollback.
2010/7/24 manman
> if use flush() then how to rollback ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To post to this group, send email to sqlalch...@googlegroups.com.
>
if use flush() then how to rollback ?
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr...@googlegroups.com.
For mor
On Sat, 2010-07-24 at 07:06 -0700, manman wrote:
> thanks.
>
> if not use "relation" then how to do? i hate use ForeignKey or
> ManyToMany.
>
So did the explicit call to session.flush() not work? Here it is again
for reference:
new_a = A()
session.begin()
session.add(new_a)
session.flush()
thanks.
if not use "relation" then how to do? i hate use ForeignKey or
ManyToMany.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sq
gbtami, Thanks!
> pypapi.org is the bigest example a know.
> It's using pyqt4, sqlalchemy and zope interfaces/schema/etc.
> The only drawback for me, the code using too much italiano :)
Indeed, too Italiano for me too, but the picture at
http://www.pypapi.org/chrome/site/pypapi.gif is worth a 100
On Jul 24, 2010, at 2:33 AM, avdd wrote:
> I rely heavily on the version_id_col feature and I would like to be
> able to either explicitly increment the version, or have the version
> incremented when a relationship changes. The issue here is that a
> change in a relationship is a semantic chang
On 7/24/2010 8:21 AM, manman wrote:
table A,B
B.a_id=A.id
my code like this:
new_a=A()
session.begin()
session.add(new_a)
new_b=B()
new_b.a_id=new_a.id
session.add(new_b)
try:
session.commit()
except:
session.rollback()
raise
why new_b.a_id is None? how to do?
I presume a.id is
table A,B
B.a_id=A.id
my code like this:
new_a=A()
session.begin()
session.add(new_a)
new_b=B()
new_b.a_id=new_a.id
session.add(new_b)
try:
session.commit()
except:
session.rollback()
raise
why new_b.a_id is None? how to do?
--
You received this message because you are subscribed to the
Hi Joel!
pypapi.org is the bigest example a know.
It's using pyqt4, sqlalchemy and zope interfaces/schema/etc.
The only drawback for me, the code using too much italiano :)
Regards,
gbtami
On Sat, Jul 24, 2010 at 3:21 AM, Joel Mohler wrote:
> Hello,
>
> I'm a happy user of sqlalchemy on small p
14 matches
Mail list logo