You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to extends a model, but can't done it without defining a new flexibleEntity.
Without this new flexibleEntity, I got an error : A converter named '\Database\OrganizationSchema\People' already exists
The text was updated successfully, but these errors were encountered:
Fixing this issue is easy: it means the model classes can override an existing entity converter when they register to the session (which is prohibited by default by using a strict register method).
I have spent a couple of hours thinking about the side effects of disabling the strct register method for model class.
In the case an inherited model class is using the same entity class as its parent with the same structure, it would just override the converter with the exactly same converter. But if, for some cases, the parent has a different structure with the same attached entity, this will override the parent entity converter leading to queries mysteriously failing from times to times. This would be a very nasty side effect very difficult to trace and sort out.
I finally ended up with the conclusion that inherited model class should also use an inherited entity class.
I tried to extends a model, but can't done it without defining a new flexibleEntity.
Without this new flexibleEntity, I got an error : A converter named '\Database\OrganizationSchema\People' already exists
The text was updated successfully, but these errors were encountered: