[sqlalchemy] Re: column_property with load_only and inheritance

2015-11-03 Thread Mattias Lagergren
Hi Michael, thank you for your quick response! Yeah, it seems that I got confused about the "load_only" method - it doesn't load at all. I've tried to put together an easier example to show the problem. It seems that it is related to the joinedload. import sqlalchemy.orm import

[sqlalchemy] Re: N-Triples to MySQL

2015-11-03 Thread Jonathan Vanasco
You probably need to ask this on an rdflib forum. Looking at your code, you're just tossing a SqlAlchemy engine into rdflib. You probably need to integrate some sort of plugin, such as https://github.com/RDFLib/rdflib-sqlalchemy -- You received this message because you are subscribed to the

[sqlalchemy] N-Triples to MySQL

2015-11-03 Thread Jeroen Steen
Hey, I'm trying to convert a N-Triples/.nt file to MySQL, with rdflib, sqlalchemy and mysql.connector with Python. This is my code: from rdflib import Graph import sqlalchemy #1.0.9 print(sqlalchemy.__version__) engine = sqlalchemy.create_engine(

Re: [sqlalchemy] compare a object/instance against its data in the database

2015-11-03 Thread Mike Bayer
On 11/03/2015 03:21 PM, c.bu...@posteo.jp wrote: Is there a way to find out if a persistent sqlalchemy mapped object was modified? It means I recieve a object (persistent, with identiy) from the database. Then the user (maybe!) modify its data in a dialog-window. obj =

[sqlalchemy] SQLAlchemy: Database Access Using Python - Developer's Library book

2015-11-03 Thread Ken Lareau
I came across this during a search, and in the four different sites I've checked, I've seen four different release dates varying from 2008 to 2018, for example: http://www.amazon.com/SQLAlchemy-Database-Access-Developers-Library/dp/0132364670 (which has 2018 for the release date). So I'm

[sqlalchemy] compare a object/instance against its data in the database

2015-11-03 Thread c.buhtz
Is there a way to find out if a persistent sqlalchemy mapped object was modified? It means I recieve a object (persistent, with identiy) from the database. Then the user (maybe!) modify its data in a dialog-window. obj = session.query(MyClass).first() LetTheUserDoSomethingWithIt(obj) if

Re: [sqlalchemy] Created edge-case bug with `contains_eager`, can't reproduce

2015-11-03 Thread Jonathan Vanasco
Ah ha! I figured this out. It was a mix of a lazy eye and some peculiarities between Postgres(live) and sqlite(test-case). Given the query: session.query(Foo).options(contains_eager('bar')).order_by(Foo.id.desc()).offset(0).limit(100).all()] The SQL is (approx) select foo.*, bar.*