On Friday, January 6, 2017 at 7:47:17 PM UTC-5, Daniel Kraus wrote:
>
> > If I'm reading your question correctly, most of what sqlalchemy does
> (and
> > excels at) is specifically keeping people from doing what you're trying
> to
> > do.
>
> I think you got me wrong then.
>
> > It seems
On 07/01/2017 00:20, Daniel Kraus wrote:
Hi!
mike bayer writes:
you're looking for session.merge() but if you're looking to save on a
SELECT you might also want to send in load=False - and if you are
starting with a fresh (non-pickled) object you probably need to
Jonathan Vanasco writes:
> On Thursday, January 5, 2017 at 8:34:52 PM UTC-5, Daniel Kraus wrote:
>>
>> The use-case is that I have a big model with lots of complex
>> relationships but 90% of the time I don't need the data from those.
>
> If I'm reading your question
Hi!
mike bayer writes:
> you're looking for session.merge() but if you're looking to save on a
> SELECT you might also want to send in load=False - and if you are
> starting with a fresh (non-pickled) object you probably need to call
> make_transient_to_detached first
you're looking for session.merge() but if you're looking to save on a
SELECT you might also want to send in load=False - and if you are
starting with a fresh (non-pickled) object you probably need to call
make_transient_to_detached first so that it acts like it was loaded from
the database
On Thursday, January 5, 2017 at 8:34:52 PM UTC-5, Daniel Kraus wrote:
>
> The use-case is that I have a big model with lots of complex
>
> relationships but 90% of the time I don't need the data from those.
>
If I'm reading your question correctly, most of what sqlalchemy does (and
excels at)
Hi!
I don't even quote my old message since it's just confusing.
In my head the question made sense ;)
So I try again with a code example:
I have a class `User`:
#+BEGIN_SRC python
class User(Base):
id = Column(Integer, primary_key=True)
name = Column(String(64))
email =
On 01/03/2017 03:10 AM, Daniel Kraus wrote:
Hi,
how can I load a sqlalchemy orm model from a dictionary?
Let's say I have a `User` model with attributes `id`, `name`, `email`
and a relationship `languages`.
I have a dict with `id`, `name`, `email` from users in my cache,
but not `languages`
Hi,
how can I load a sqlalchemy orm model from a dictionary?
Let's say I have a `User` model with attributes `id`, `name`, `email`
and a relationship `languages`.
I have a dict with `id`, `name`, `email` from users in my cache,
but not `languages` that's rarely used.
Is it possible to create a