you need to put a cascade rule on Page.user_relationships, such that when
you remove a Page_to_User from the collection, it’s marked as deleted,
instead of SQLAlchemy setting the page_id foreign key to NULL, which is
invalid here b.c. that column is part of the primary key (and hence the
On Jan 8, 2014, at 8:55 PM, limodou limo...@gmail.com wrote:
Yes, I saw the code about 0.8.X and 0.9.1, the None convertion are the same.
But difference between them is in AND process. So this inconsistent that
you mean it's a bug in 0.8?
it’s a bug in 0.8, yes.
I think raise
On Jan 9, 2014, at 10:02 AM, Russell Holloway russ.d.hollo...@gmail.com wrote:
you need to put a cascade rule on Page.user_relationships, such that when you
remove a Page_to_User from the collection, it’s marked as deleted, instead of
SQLAlchemy setting the page_id foreign key to NULL,
OK so, you have:
Page.user_relationships - collection of PageToUser
PageToUser - single User
then, you are saying :
some_page.user_relationships = []
session.flush()
What SQL would you expect this to produce? After a flush, what would the
rows in your page_to_user table look
Hello guys,
I'm building a web service to provide data to our SDK and I'm facing a
wired problem. I have created 4 different models for my needs, a base class
that is called *Unit*, two derivatives from the base class *VideoUnit*,
*QuestionUnit*, and the last class is a derivative of both
Thank you for the reply! Sorry for the delayed response. (Holidays.)
On Mon, Dec 23, 2013 at 11:52:25PM -0800, Laurence Rowe wrote:
On Thursday, 12 December 2013 16:30:59 UTC-8, Jeff Dairiki wrote:
Do you understand why the datamanager is finding the SessionTransaction
and using that
On Jan 9, 2014, at 10:31 AM, Russell Holloway russ.d.hollo...@gmail.com wrote:
OK so, you have:
Page.user_relationships - collection of PageToUser
PageToUser - single User
then, you are saying :
some_page.user_relationships = []
session.flush()
What SQL would you expect this
On Jan 9, 2014, at 11:32 AM, Enrico Bottani bei...@mac.com wrote:
Hello guys,
I'm building a web service to provide data to our SDK and I'm facing a wired
problem. I have created 4 different models for my needs, a base class that is
called Unit, two derivatives from the base class
The following is a stripped down example of my app, that does NOT show the
problem:
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship, backref, sessionmaker
from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy import
On Jan 9, 2014, at 4:02 PM, Paul Moore p.f.mo...@gmail.com wrote:
The real app is basically just a lot more complex (releases have 4 child
lists like urls, my example adds multiple objects in each list. The app fails
with an integrity error because a url has a null request_id. In actual
On Thursday, 9 January 2014 21:27:06 UTC, Michael Bayer wrote:
I think one of the error tracebacks (sorry, I lost them in other output)
mentioned autoflush - could the ORM be trying to flush bits of the
hierarchy before it's complete? Is there a better fix than removing the
nullable=False
Hi,
I am using SQLAlchemy version 0.7.6 with pyodbc to connect to MSSQL 2012.
Currently I am using SQLAlchemy only for its connection pooling etc. So, at
the moment I only use the engine.execute function to execute string
queries.
Weirdly, the following query seems to have no effect at
Hi, folks,
I observed that it seems all ORM objects in a session will expire
immediately if there is a failure in session.flush(). I was wondering
what's the rationale behind this behavior.
Following is an artificial web application code to illustrate the idea:
def PUT():
#
The statement is likely being invoked but is in a transaction that isn’t
getting committed (assuming you’re using commit() with pyodbc). SQLAlchemy
has an “autocommit” feature that by default looks for SQL strings that indicate
a COMMIT should occur. So in this case you should make sure
On Jan 9, 2014, at 7:17 PM, Weikai Xie xiewei...@gmail.com wrote:
Hi, folks,
I observed that it seems all ORM objects in a session will expire
immediately if there is a failure in session.flush(). I was wondering what's
the rationale behind this behavior.
Following is an artificial
15 matches
Mail list logo