I’m trying to represent a graph with nodes and edges…
For the nodes I’m using polymorphic single-table inheritance. The
relevant mapping & code is:
# Mapper classes:
#
# Project
#
# Node
# -> Algorithm
# -> Parameter
#
# Edge
# Project.nodes ->
Node
(->N)
#
Thanks Michael, I am
trying to build up the complexity one piece at a time, and you've already
answered several issues up to this point. Like you said in the earlier email,
this is an atypical mapping and I'm impressed to date with how well SA has been
handling it. I'll try to find ways of m
I'm getting a strange error
when flushing the session after the following sequence of
creations:
def
test_nodes(self): algs =
[Algorithm(name='a'+str(num)) for num in
range(0,7)]1) params = [Parameter(name='p'+str(num))
for num in range(0,20)] for a in
algs:
I've been spending the past few hours trying to
understand/debug a problem I'm having with my single-table inheritance mapping.
I am attaching the code for a test case that results in an attribute error. The
relevant pieces (I think) are shown below. They result in an AttributeError in
the sess
Title: Re: [Sqlalchemy-users] How ACID are SQLAlchemy transactions?
Looking at the code, the
problem seems to arise in sqlalchemy/orm/mapper.py, in the save_obj
function
The basic structure is:
run before_insert/before_update for all
objects
save all the mapper attributes to a table
Title: Re: [Sqlalchemy-users] How ACID are SQLAlchemy transactions?
I'm having a little
difficulty figuring out how to work with compound primary keys within the
following context: I have Projects, Versions, and for examples sake, 'Things'
inside of both of these, as follows:
CREATE TABL
6 matches
Mail list logo