mention future support for join columns

This commit is contained in:
Marc-Roig 2023-03-14 09:01:01 +01:00 committed by Josh
parent 2faed39cbb
commit 8241f4ae3a

View File

@ -1202,11 +1202,14 @@ const createEntityManager = (db) => {
);
}
// TODO: add support for cloning polymorphic relations
if (attribute.joinColumn) {
// TODO: add support for cloning oneToMany relations on the owning side
return;
}
if (!attribute.joinTable) {
throw new DatabaseError(
`Cloning relations of type ${attribute.relation} is not supported`
);
// TODO: add support for cloning polymorphic relations
return;
}
if (isOneToAny(attribute) && isBidirectional(attribute)) {