"Mike Bayer" <mike_not_on_goo...@zzzcomputing.com> writes:

> On Thu, Feb 16, 2023, at 7:16 AM, Lele Gaifax wrote:
>> 
>> TL;DR
>> 
>>   Why is the sqlalchemy.ext.hybrid.Comparator.property explicitly
>>   raising a NotImplementedError?
>
> the .property attribute in the base PropComparator refers to an ORM
> instrumented attribute, which in the case of a custom Comparator does
> not exist. This was None previously, but for typing purposes, now
> raises NotImplementedError since it should not be accessed.

Ok, thank you for the clarification.

>
> dont use getattr(), use methods like inspect(cls).attrs,
> inspect(cls).relationships and inspect(cls).all_orm_descriptors to get
> a view for what ORM things are associated with the class and which are
> relationships. that all works in 1.4 also.

Perfect, I will find my way!

Thanks again,
ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it  |                 -- Fortunato Depero, 1929.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/87edqpbi1v.fsf%40metapensiero.it.

Reply via email to