Re: [sqlalchemy] setters and getters on an automapped table

2016-08-29 Thread Robert Minsk
When I try to do that I get File "/home/CORP/robert.minsk/venvs/lfw/lib/python2.7/site-packages/sqlalchemy/util/_collections.py", line 212, in __getattr__ raise AttributeError(key) AttributeError: hosts On Fri, Aug 26, 2016 at 1:33 AM, Simon King wrote: > On Fri,

Re: [sqlalchemy] joinedload() vs join()

2016-08-29 Thread Mike Bayer
On 08/29/2016 08:32 AM, mgozda...@starfishstorage.com wrote: Hi I have a question about the difference between .join() and .options(joinedload()). I'm using example from http://docs.sqlalchemy.org/en/rel_1_0/orm/extensions/hybrid.html#working-with-relationships (the one with SavingsAccount

Re: [sqlalchemy] Postgres how to autoincrement sequence number for new records, partitioned by column?

2016-08-29 Thread Mike Bayer
On 08/28/2016 02:42 PM, Duke Dougal wrote: I'm using POstgres 9.5, Python 3 and SqlAlchemy 1.0.14 When a new Issue is created, I want it to have sequence_number equal to the largest existing sequence number + 1 Each thread_id has its own sequence starting at 1. However when I create a new

[sqlalchemy] joinedload() vs join()

2016-08-29 Thread mgozdalik
Hi I have a question about the difference between .join() and .options(joinedload()). I'm using example from http://docs.sqlalchemy.org/en/rel_1_0/orm/extensions/hybrid.html#working-with-relationships (the one with SavingsAccount and User) The doc shows SQL for Session().query(User,