Sure. The problem I think is that the Reference doesn't know if it's called on the original class or the alias. _local_key is not updated, and thus the relation built has no idea that the class is not the original class. There may be something wrong with _find_descriptor_class too, because it can't return the alias class as it browses the MRO. I *think* if Relation._build_relation is fixed so that self._local_key.table ends up pointing at the alias class, it should work.
Sure. The problem I think is that the Reference doesn't know if it's called on the original class or the alias. _local_key is not updated, and thus the relation built has no idea that the class is not the original class. There may be something wrong with _find_descripto r_class too, because it can't return the alias class as it browses the MRO. I *think* if Relation. _build_ relation is fixed so that self._local_ key.table ends up pointing at the alias class, it should work.