Closed kasium closed 1 year ago
Do you have a short example which uses this? Would be cool, if you could submit it along to a PR for it :+1:
But just a small example would help too!
Sure. You can find an offical example here: https://docs.sqlalchemy.org/en/20/orm/mapping_styles.html#declarative-mapping. I solved it local with this code
from eralchemy2 import main as eralchemy2_main
eralchemy2_main.switch_input_class_to_method[
"DeclarativeAttributeIntercept"
] = eralchemy2_main.declarative_to_intermediary
When using render_er with a class extending DeclarativeBase an error is raised, because
switch_input_class_to_method
cannot handleDeclarativeAttributeIntercept
. I'm happy to give a PR a try