On 04/21/2016 07:22 AM, Chris Withers wrote:
I ended up going with
https://github.com/cjw296/chide/blob/master/chide/sqlalchemy.py#L26
having read those.
Sounds about right?
oh. I thought you wanted the code that *assigned* state.key. The code
to just figure out what the key should be is
Hi All,
I've just released a new version of this tiny
library for making sample objects for testing.
Here's a SQLAlchemy example:
class Parent(Base):
__tablename__ = 'parent'
id = Column(Integer, primary_key=True)
child_id = Column(Integer,
I ended up going with
https://github.com/cjw296/chide/blob/master/chide/sqlalchemy.py#L26
having read those.
Sounds about right?
On 21/04/2016 00:23, Mike Bayer wrote:
on the load side in loading.py and on the persistence side in
session.py _register_newly_persistent.
On 04/20/2016
On Wednesday, April 20, 2016 at 3:38:01 PM UTC+2, Mike Bayer wrote:
>
>
> you can put "id" in declared_attr, should work:
>
> class Model(Base):
> @declared_attr
> def id(cls):
> return Column(Integer, Sequence(cls.__tablename__ + "id_seq"),
> ...)
>
Id does not work due
Aha, thanks for that. For the benefit of anyone who comes across this
later, my final script looked much like this:
def downgrade():
try:
inner_transaction = op.get_bind().begin_nested() # establish a
savepoint
with op.batch_alter_table("user_authentication_method") as