It appears the ‘Instant reverse’ → ‘python source’ function can’t handle classes that are created with the
A message is shown that instant reverse has been ‘completed with errors’ and none of these classes are part of the generated model.
Classes that inherit from these classes are also completely excluded.
I have looked into the
vp.log file for an error message, but none is shown.
To reproduce the bug a python module containing this code can be given to the instant reverse tool;
class Test(metaclass=type): A = 1 class InheritedTest(Test): B = 2 class NoMeta: C = 3
We are actually using the sqlalchemy package in our project and using the declarative base mapping to map our python classes to the sqlalchemy orm.
This is done by inheriting classes that should be persisted from the sqlalchemy declarative base class.
Since the declarative base class is a metaclass, our complete orm model is missing when using this visual paradigm feature.
It would be wonderful if this piece of code could be successfully reversed:
from sqlalchemy.orm.decl_api import registry, DeclarativeMeta sql_alchemy_registry = registry() class SqlAlchemyBase(metaclass=DeclarativeMeta): registry = sql_alchemy_registry metadata = sql_alchemy_registry.metadata __abstract__ = True __init__ = sql_alchemy_registry.constructor
Thank you in advance for considering this report. I look forward to your response.