Closed dimma837 closed 4 years ago
Hi,
AttributeInjection
implements the python descriptor protocol. See https://docs.python.org/3/howto/descriptor.html. It allows an object to specify the __get__()
method which is invoked automatically on attribute access. AttributeInjection
returns an injected dependency in this method.
It seems, peewee somehow breaks the default attribute access and does not call the descriptor __get__()
method manually.
I think it's better to ask the peewee author directly to support descriptors as database
attributes.
Thanks for your answer, I created an issue in peewee project.
Hi, Ivan! Thank you for creating this library. But I have some difficulties using it with peewee ORM. Main setup:
models
packet:Then during insertion
User.create(id='unique_id', name='John')
I caught this:It looks like
_AttributeInjection
container doesn't unwrap intoMySQLDatabase
instance. Can you help me? Is it my stupidity?Enviroment: