Yes, I would say that is an acceptable solution to me. My current attempt,
which I think might work, is to grab all the primary keys off the original
list of objects, then use those on an IN clause where I load only the
primary key (by deferring everything else) of the parent and the desired
Hello,
i posted my question on stakoverflow. So to not repeat myself:
https://stackoverflow.com/questions/26724897/adjacency-list-abstract-base-class-inheritance-used-in-relationship
Josip
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To
I was thinking of sqlalchemy-utils:
https://github.com/kvesteri/sqlalchemy-utils
https://github.com/kvesteri/sqlalchemy-utils , as I recall Konsta showing me
the loader he wrote, but now I’m not seeing it here. I’ll keep poking
around.
You might want to take a look at the example for
there is a lot lot lot going on here. The example isn’t working in 1.0 for
different reasons, for example.
However lets start with just the error you have, and to do that, lets please
just show the minimal amount of code to reproduce:
from sqlalchemy import *
from sqlalchemy.orm import *
OK, coffee has been applied.This mapping can be done in 0.9 but only if you
use classical mappings, AbstractConcreteBase and declarative aren’t ready yet.
In 1.0, I made a lot of improvements (see
Ah yes, perfect!
The set_committed_value was the last piece I needed, to prevent lazy
loading while setting the new values from the IN clause query. I like that
DisjointEagerLoading recipe, as it pretty much captures the same idea.
Oh, and perhaps I should say it again in case anyone in the
I've been going batty on this all morning.
I have a permissions check routine that repeatedly queries for a certain
Foo2Bar table
class Foo2Bar(Base):
__tablename__ = 'foo_2_bar'
id_foo = Column(Integer, ForeignKey(foo.id), primary_key=True)
id_bar = Column(Integer,
On Tue, Nov 4, 2014 at 3:15 PM, Jonathan Vanasco jvana...@gmail.com wrote:
I have a permissions check routine that repeatedly queries for a certain
Foo2Bar table
class Foo2Bar(Base):
__tablename__ = 'foo_2_bar'
id_foo = Column(Integer, ForeignKey(foo.id),
Thanks!
I didn't realize that objects are cleaned up with scope like normal python
objects. I thought they were in the session for the lifetime of the
session. This was driving me crazy.
This is just a web request, so I'm now appending the result into
`request.persistanceArray`. instantly
I’m trying to get a simple join working to a parent table with group_by. I’ve
tried some variations working from the ORM tutorial but keep running into
exceptions or I get multiple queries.
I’m trying to get a single query that results in a collection of Client
instances that’s joined to and
query.options(joinedload()) is not used for creating joins, you need you use
query.join().
See
I am trying to perform a query in which I from multiple correlated
subqueries. My code works with 0.7.10, but not with 0.9.8.
Base = declarative_base()
class User(Base):
__tablename__ = 'user'
id = Column(Integer, primary_key=True)
name = Column(String)
class Action(Base):
12 matches
Mail list logo