[sqlalchemy] Re: Differences between `op.get_bind()` and `op.get_bind().engine.connection()`

2019-05-15 Thread Diego Quintana
Diego Quintana: > Hello! I'm trying to seed my database using my first migration script, and > I have trouble understanding what `op.get_bind()` returns, and mainly the > difference between `Connection` and `engine.connection()`. Say I have a > migration script that creates a table ca

[sqlalchemy] Re: Differences between `op.get_bind()` and `op.get_bind().engine.connection()`

2019-05-10 Thread Diego Quintana
ist`, which probably happens because of what is being discussed here. What other options do I have? How would I get a raw connection from `context` or `bind`? Once again, thanks for your time Am Freitag, 10. Mai 2019 13:09:04 UTC+2 schrieb Diego Quintana: > > Hello! I'm trying to seed

[sqlalchemy] Differences between `op.get_bind()` and `op.get_bind().engine.connection()`

2019-05-10 Thread Diego Quintana
Hello! I'm trying to seed my database using my first migration script, and I have trouble understanding what `op.get_bind()` returns, and mainly the difference between `Connection` and `engine.connection()`. Say I have a migration script that creates a table called `cities` and then it performs

Re: [sqlalchemy] How to override append and remove methods used in orm.relationships

2018-05-18 Thread Diego Quintana
the code bit you changed makes it work, thanks!. There are a lot of things I don't understand. But first, why does I need to use `session_object`? to expose the `execute` method? What is that I am "bypassing" by using this over the orm? Am Freitag, 4. Mai 2018 11:40:34 UTC-3 schrieb D

Re: [sqlalchemy] How to override append and remove methods used in orm.relationships

2018-05-04 Thread Diego Quintana
t.child.id} > ) > > I added a second test for the other case and this works as far as I've > gotten it. since we are only dealing with these standalone > association tables the above is pretty simple, and now you only emit > one query (albeit a DML query, not a SELECT

Re: [sqlalchemy] How to override append and remove methods used in orm.relationships

2018-05-03 Thread Diego Quintana
lexandro Quintana Valenzuela Ingeniero Civil Electricista Universidad de la Frontera - Chile +56 9 7965 3455 IEEE PES & CIS Member diego.quint...@ieee.org LinkedIn https://www.linkedin.com/in/diego-quintana-valenzuela/ 2018-05-03 8:39 GMT-03:00 Diego Quintana <daquinta...@gmail.com>: > Th

Re: [sqlalchemy] How to override append and remove methods used in orm.relationships

2018-05-03 Thread Diego Quintana
ks again for your time Diego Alexandro Quintana Valenzuela Ingeniero Civil Electricista Universidad de la Frontera - Chile +56 9 7965 3455 IEEE PES & CIS Member diego.quint...@ieee.org LinkedIn https://www.linkedin.com/in/diego-quintana-valenzuela/ 2018-05-02 18:46 GMT-03:00 Mike Bayer <mik

Re: [sqlalchemy] How to override append and remove methods used in orm.relationships

2018-05-02 Thread Diego Quintana
does not have access to all of the child's pets if __name__ == '__main__': # run tests unittest.main() Am Mittwoch, 2. Mai 2018 11:40:14 UTC-3 schrieb Mike Bayer: > > On Wed, May 2, 2018 at 10:14 AM, Diego Quintana <daqui...@gmail.com > > wrote: > > This worked. >

Re: [sqlalchemy] How to override append and remove methods used in orm.relationships

2018-05-02 Thread Diego Quintana
r from another listener, where the second call can't find something that was already deleted. This might be a long shot, but I'm hoping this pattern might be solved already. Am Donnerstag, 26. April 2018 13:00:45 UTC-3 schrieb Mike Bayer: > > On Thu, Apr 26, 2018 at 11:04 AM, Diego Quin

[sqlalchemy] How to override append and remove methods used in orm.relationships

2018-04-26 Thread Diego Quintana
Hello. Say I have three tables in a declarative fashion, `Parent`, `Child`, and `Pet`, in such way that * `Parent` has a many-to-many relationship with both `Child` and `Pet`, meaning that a Parent can own a Child and its pets, and also a Pet without its Child. * `Child` has a one-to-many