Jonathan Vanasco <jvana...@gmail.com> 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.
>
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
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 =
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
On Tuesday, 23 February 2016 23:16:25 UTC+8, Mike Bayer wrote:
>
>
> On 02/23/2016 04:00 AM, Daniel Kraus wrote:
> > Here is a simple script to demonstrate the error:
> >
> > https://gist.github.com/dakra/0424086f5837d722bc58
>
> the joinedload() case "
Hi,
I want to use mysqls `SQL_CALC_FOUND_ROWS` but when I use
`query.prefix_with(...)` it fails when the query eager loads a relationship
because sqlalchemy puts the prefix not at the beginning.
I'm not sure if I should file a bug report or if it's intended behaviour.
If I'm doing something
Hi,
when I try to connect with sqlalchemy and mssql+pyodbc I get this exeption:
TypeError: The first argument to execute must be a string or unicode
query.
It works if I only use pyodbc.
E.g.
conn = pyodbc.connect('DRIVER={SQL
Server};Server=127.0.0.1;Database=BOM;UID=guest;PWD=guest')