Any suggestion helping solving this?
On 25 août, 13:02, Martin-Leon Francois francois@gmail.com
wrote:
Hi,
I am trying in the same session to detach an instance from a collection (
one to many)
flush and commit everything (all is ok) and then attach the removed instance
again.
Hi Michael,
yes, you're right of course. This overlapped with the other issue you
mentioned about the nutrient_weight/weight column name. I didn't
realize this at once. When I change the column name or the mapping
appropriately I don't need to return None anymore.
Thanks again
Frank
--
You
On Tue, Aug 24, 2010 at 02:48:37PM -0400, Michael Bayer wrote:
Info option is clearly very handy. At the moment I implemented an image
field in sqlkit, (that's just a bunch of handler in the gui). In order to do
that I used a type inherited with no addition, just to understand that that
hi,
The problem seems to be a little bit more general, I have a unique class (doing
nothing) mapped to a unique table.
After opening a session, I create an instance, add it to the session, flush,
commit.
Everything is ok. -- a row in the table, instance in the identity_map of the
session
On Aug 26, 2010, at 5:09 AM, Alessandro Dentella wrote:
On Tue, Aug 24, 2010 at 02:48:37PM -0400, Michael Bayer wrote:
Info option is clearly very handy. At the moment I implemented an image
field in sqlkit, (that's just a bunch of handler in the gui). In order to do
that I used a type
Sorry if you receive this twice, I am not sure if it had been
correctly posted.
On 26 août, 14:49, Martin-Leon Francois francois@gmail.com
wrote:
hi,
The problem seems to be a little bit more general, I have a unique class
(doing nothing) mapped to a unique table.
After opening a
On Aug 26, 2010, at 8:49 AM, Martin-Leon Francois wrote:
hi,
The problem seems to be a little bit more general, I have a unique class
(doing nothing) mapped to a unique table.
After opening a session, I create an instance, add it to the session, flush,
commit.
Everything is ok. -- a
Dear All,
After I read SQLAlchemy;s FAQ I think below code may works,
import sqlalchemy.pool as pool
import sqlite3 as sqlite3
conn_proxy = pool.manage(sqlite3)
# then connect normally
connection = conn_proxy.connect(...)
however I also get below snippets:
engine = create_engine(...)
ok, many thx
fma
Le 26 août 2010 à 17:03, Michael Bayer a écrit :
On Aug 26, 2010, at 8:49 AM, Martin-Leon Francois wrote:
hi,
The problem seems to be a little bit more general, I have a unique class
(doing nothing) mapped to a unique table.
After opening a session, I create an
On Aug 25, 2010, at 7:02 AM, Martin-Leon Francois wrote:
assert(len(o1.to_many) == 2) #this assert fails why?
OK so as of r2e09679be06b, your original test now returns:
sqlalchemy.exc.InvalidRequestError: Instance 'Many at 0x12922f0' has been
deleted. Use the make_transient() function to
Hi All,
For the following model:
class Header(Base):
__tablename__ = 'header'
id = Column(Integer, primary_key=True)
message_id = Column(Integer,ForeignKey('message.id'))
name = Column(String(50))
value = Column(Text(255))
sqlalchemy-migrate's SchemaDiff tool against the
Sorry for last mail, I clicked send without spell check, so it may cause
confuse, pls ignore last mail.
=
Dear All,
After I read SQLAlchemy's FAQ I think below code may works,
import sqlalchemy.pool as pool
import sqlite3 as sqlite3
conn_proxy = pool.manage(sqlite3)
# then
On Aug 26, 2010, at 11:42 AM, Chris Withers wrote:
Hi All,
For the following model:
class Header(Base):
__tablename__ = 'header'
id = Column(Integer, primary_key=True)
message_id = Column(Integer,ForeignKey('message.id'))
name = Column(String(50))
value =
Hi again, sorry for flooding with email this week...
I stumbled on the CircularDependencyError in some occasions with self
referencing models. I do understand that it can be tricky to INSERT and DELETE
but I'm just updating rows.
I reduced my problem to the bare minimum. It works both on 0.5.8
Michael Bayer wrote:
How can it be changed so that the column reflected from the DB and the column
calculated from the model end up being the same?
if schemas are being diffed, types can be compared generically using type
affinity. This is described at:
need a full test case. Here's yours, runs fine:
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import *
from sqlalchemy.types import *
from sqlalchemy.orm import *
Base = declarative_base()
e = create_engine('sqlite://', echo=True)
Base.metadata.bind = e
sess =
of course you'll get a cycle if you do this, though:
s1 = School(cod=S1, cod_riferimento=S1, cliente=False)
d1 = School(cod=D1, cod_riferimento=S1, cliente=False)
s1.sedi = [s1, d1]
s1-s1 is not supported by self referential flushes, unless you put
post_update=True on the relation() you have
On Aug 26, 2010, at 12:15 PM, Chris Withers wrote:
Michael Bayer wrote:
How can it be changed so that the column reflected from the DB and the
column calculated from the model end up being the same?
if schemas are being diffed, types can be compared generically using type
affinity. This
Is there a way to set 'echo' at any time? Everything I can find sets it when
the engine is created and doesn't seem to change it afterward.
Thanks,
Michael
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to
I think where I'm getting bogged down with the case I have (most
likely because I'm new to relational mapping of db tables anyway) is
how I get data into the intermediate table. What I'm doing here is
setting up a dependency graph where that entityConnections table
needs to have data explicitly
On Thu, Aug 26, 2010 at 4:21 PM, Michael Hipp mich...@hipp.com wrote:
Is there a way to set 'echo' at any time? Everything I can find sets it
when the engine is created and doesn't seem to change it afterward.
Thanks,
Michael
You can assign the engine.echo property to True or False any
On Wed, Aug 25, 2010 at 1:30 PM, keekychen.shared
keekychen.sha...@gmail.com wrote:
How to test if an existing database file is a valid sqlite3 format
file before using sqlalchemy?
Here is function we use
import os, os.path as osp
try:
from pysqlite2 import dbapi2 as sqlite
except:
I've been looking through the documentation and I could have sworn I
saw it before but It seem I can't find it once more...
I'm looking for how to set up a self referencing column like in this
pseudo scenerio:
class Action(DeclarativeBase):
__tablename__ = 'action'
id =
I'm guessing that the answer would be as at:
http://www.sqlalchemy.org/trac/wiki/UsageRecipes/DeclarativeSelfReferencingTable
?
On Aug 26, 8:02 pm, waugust waugustyn...@gmail.com wrote:
I've been looking through the documentation and I could have sworn I
saw it before but It seem I can't find
This is the documentation for self referential mapper:
http://www.sqlalchemy.org/docs/mappers.html#adjacency-list-relationships
I guess you have found the recipes for doing it the declarative way.
2010/8/26 waugust waugustyn...@gmail.com:
I'm guessing that the answer would be as at:
Thanks, though! :)
Don't suppose you would have an idea on how I could store a procedure? :)
the actions to which I'm pertaining I envisioned as controller actions
(Pylons) that I could define an associate with an execution flow... (don't
know if that makes sense)...
I was thinking of just
26 matches
Mail list logo