Il 09/08/11 02.42, Aviv Giladi ha scritto:
Dear Stefano,
First of all, thank you. Allow me to express how much I appreciate
your time and assistance - you and your colleagues are making the
technology world this much better by being so attentive and helpful!
Thank you.
Therefore I chose t
Il 08/08/11 22.53, Aviv Giladi ha scritto:
Dear Stefano,
I have been able to create a reproducing project. I am sending it to
you directly because I was unable to figure out how to attach the test
file to the message board. I will post our findings there once we are
done.
The included scrip
Stefano,
Thank you again for your time. I am sorry for not posting my actual
code - it is sensitive, therefore I am trying to reproduce the same
issue with different code.
In my __init__ function of my Rating I am setting 3 members that are
objects like so:
self.member = member
These members
Il 07/08/11 20.08, Aviv Giladi ha scritto:
I see.
Where can I start looking for such an error? What could possibly be
causing this?
I'm sorry but I cannot help you without your code... not a similar code
but THE code which produce that error.
Regards,
Stefano.
--
Ing. Stefano Fontanelli
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 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 before I add it to th
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 before I add it to the session.
However, I need to be able to create a Rating that only has 1 or 2
subratings, and the other subratings absent.
When I do that, SQLAlche
Stefano,
Thanks! Your script helped me narrow down the problem.
My Rating object has multiple Subrating objects. So in my real code, I
have something like:
class SubRating1(Base):
__tablename__ = 'subratings1'
id = Column(Integer, primary_key=True)
name = Column(Unicode(32), unique=True
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 session.delete(rating_obj) and commit it. I look at the
DB, and the Rating is gone, but the SubRating is still there.
The DB shows that the Rating has th
Hi Stefano,
Thanks! The code is just like this:
subrating_subratingproperty_association =
Table('subrating_subratingproperty_association',
Base.metadata, Column('subrating_id', Integer,
ForeignKey('subratings.id')),
Column('subrating_property_id', Integer,
ForeignKey('subrating_properties.id'
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 while inserting
a new rating:
InterfaceError: (InterfaceError) Error binding parameter 0 - probably
unsupported type. u'SELECT subratings.id AS subratings_id \nFROM
subratings \nWHERE s
Hey Stefano,
I tried that, but when I did, this is the error I got while inserting
a new rating:
InterfaceError: (InterfaceError) Error binding parameter 0 - probably
unsupported type. u'SELECT subratings.id AS subratings_id \nFROM
subratings \nWHERE subratings.id = ?' (,)
On Aug 5, 9:46 am, Ste
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))
This unfortunately doesn't work - when I delete a Rating, the
according Subra
Hey,
Tried adding cascade to Rating's backref call like so:
subrating = relationship("SubRating", backref=backref("rating",
cascade="all, delete-orphan"
uselist=False))
This unfortunately doesn't work - when I delete a Rating, the
according Subratings are NOT removed.
What am I doing wrong?
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?
ONUPDATE/ONDELETE cascade -> SQL expression: on SQLite and MySQL MyISAM
doesn't work at all.
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?
Thanks again!
On Jul 30, 11:08 am, Michael Bayer wrote:
> SQLAlchemy's "cascade='all, delete-orphan'" implements the same CASCADE
> functi
SQLAlchemy's "cascade='all, delete-orphan'" implements 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 res
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
wrote:
> Il 28/07/11 01.15, Aviv Giladi ha scritto:
>
> > Hi,
>
> > I am actually usin
Il 28/07/11 01.15, Aviv Giladi ha scritto:
Hi,
I am actually using both MySQL and SQLite (one on the dev machine, one
on the server).
Does that make a difference?
ONDELETE and ONUPDATE don't work on SQLite and MySQL MyISAM.
You must change your database to test them.
In MySQL you can create yo
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 wrote:
> On Jul 25, 2011, at 9:47 AM, Aviv Giladi wrote:
>
>
>
>
>
>
>
>
>
> > I can't seem to make cascade deletes work in sqlalchemy.
>
> >
19 matches
Mail list logo