are objects that have a relationship with Rating.
When I remove these assignments, everything works fine.
Does this ring any bells?
On Aug 7, 1:15 pm, Stefano Fontanelli s.fontane...@asidev.com wrote:
Il 07/08/11 20.08, Aviv Giladi ha scritto:
I see.
Where can I start looking
I see.
Where can I start looking for such an error? What could possibly be
causing this?
On Aug 7, 6:51 am, Stefano Fontanelli s.fontane...@asidev.com wrote:
Il 07/08/11 00.35, Aviv Giladi ha scritto:
Everything works great when I create and assign all 3 subratings to
the rating object
subrating1 and subrating3, but
not subrating2.
How do I avoid this error?
On Aug 6, 6:16 am, Stefano Fontanelli s.fontane...@asidev.com wrote:
Il 06/08/11 00.32, Aviv Giladi ha scritto:
Hi Stefano,
I create and add a Rating and Subrating (both end up in the DB no
problem).
Then, I call
,)
On Aug 5, 9:46 am, Stefano Fontanelli s.fontane...@asidev.com wrote:
Il 04/08/11 21.27, Aviv Giladi ha scritto:
Hey,
Tried adding cascade to Rating's backref call like so:
subrating = relationship(SubRating, backref=backref(rating,
cascade=all, delete-orphan
uselist=False
, and the Rating is gone, but the SubRating is still there.
The DB shows that the Rating has the correct Subrating's ID..
On Aug 5, 11:45 am, Stefano Fontanelli s.fontane...@asidev.com
wrote:
Il 05/08/11 20.38, Aviv Giladi ha scritto:
Hey Stefano,
I tried that, but when I did, this is the error I got
? (Testing with SQLite)
On Jul 31, 9:01 am, Stefano Fontanelli s.fontane...@asidev.com
wrote:
Il 30/07/11 23.24, Aviv Giladi ha scritto:
Sorry, but I am really confused.
Are you guys saying that on SQLite for example, cascade deletes don't
work at all? Or do they work, but are less efficient
Thank you for your response.
In that case, how do you manage these kinds of situations in SQLite
and other engines in MySQL?
Do you manually delete the children as well?
On Jul 28, 10:35 am, Stefano Fontanelli s.fontane...@asidev.com
wrote:
Il 28/07/11 01.15, Aviv Giladi ha scritto:
Hi,
I
the same CASCADE
functionality as ONDELETE does, in Python. It is just less efficient since
collections need to be fully loaded into memory for them to be processed.
On Jul 30, 2011, at 1:49 PM, Aviv Giladi wrote:
Thank you for your response.
In that case, how do you manage
Hi,
I am actually using both MySQL and SQLite (one on the dev machine, one
on the server).
Does that make a difference?
On Jul 27, 12:26 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Jul 25, 2011, at 9:47 AM, Aviv Giladi wrote:
I can't seem to make cascade deletes work
I can't seem to make cascade deletes work in sqlalchemy.
I have a parent class (called Rating), a sub class (Subrating) and a
third class called SubRatingProperty.
There is a one-to-one relationship between Rating and SubRating - each
Rating can only have one specific SubRating object. Next, the
Hey guys,
I have a Pylons back-end running on SQLAlchemy. I have a script that
reads a tree of XML files from an HTTP server (it downloads an xml X,
and then downloads that X's children, and then iterates the children,
and so forth in recursion). Each xml file represents an SQLAlchemy
model.
The
Dear Rick,
Thank you for your reply. I understand, but is there not a better way
than doing a lot of single commits in case of a commit exception?
In other words, is there a way to tell SQLAlchemy to throw an
exception on the Session.add if there's a duplicate as opposed to on
the Session.commit?
I agree, but the thing is that committing every 10 entries is a little
low for me, I was thinking of around 50, at which case having 50
individual commits is quite costly..
In case I choose the implement your method, how would you go about it?
How do you keep objects of the last 50 or whatever
Thanks again Rick. The issue is that I have a LOT of duplicates
(around 20-30%) - that's just how that tree is structured.
Therefore, I think I am going to go with catching DB exceptions
regardless, but also use an indexed collection to prevent duplicates.
Cheers!
On Apr 20, 12:43 pm, Richard
Hey guys,
I have a SQLAlchemy model with a Unicode column. I sometimes insert
unicode values to it (u'Value'), but also sometimes insert ASCII
strings. What is the best way to go about this? When I insert ASCII
strings with special characters I get this warning:
SAWarning: Unicode type
Thank you for your responses everyone.
I have one more question - the really time heavy task here is
retrieving the URLs over HTTP (it takes almost a second per URL).
I am using urllib3 that has connection pooling, but other than that,
is there any other way to speed this up? Perhaps
Figured it out, I was being retarded. Thanks!
On Apr 19, 7:33 pm, Aviv Giladi avivgil...@gmail.com wrote:
Hey guys,
I am playing around with SQLAlchemy (over Pylons) and encountering a
strange problem. I am using the adjacency list relationship concept to
represent nodes and their parents
Hey guys,
I encountered a very strange problem with SQLAlchemy. I have a model
that is self-referencing (adjacency list relationship). I simply
copied the model (Node) from the SQLAlchemy tutorial. Here is the
model's code:
class Node(Base):
__tablename__ = 'nodes'
id =
18 matches
Mail list logo