-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
There is a problem when updating C's value for cmixedblocks when it, and cmixedblocks2 are both referencing the same A (could be further than this)
import { CollectionConfig } from "payload/types";
const A: CollectionConfig = {
slug: "a",
access: {
read: () => true,
},
fields: [
{
name: "name",
type: "text",
},
{
type: "relationship",
relationTo: "c",
hasMany: true,
name: "amixedblocks",
custom: {
relationshipEnhancer: {
relationshipIntegrity: true,
biDirectional: [
{
relationTo: "c",
path: "cmixedblocks",
},
],
},
},
},
{
type: "relationship",
relationTo: "c",
hasMany: true,
name: "amixedblocks2",
custom: {
relationshipEnhancer: {
relationshipIntegrity: true,
biDirectional: [
{
relationTo: "c",
path: "cmixedblocks2",
},
],
},
},
},
],
};
export default A;
and
import { CollectionConfig } from "payload/types";
const C: CollectionConfig = {
slug: "c",
access: {
read: () => true,
},
fields: [
{
name: "name",
type: "text",
},
{
type: "relationship",
relationTo: ["a", "b"],
hasMany: true,
name: "cmixedblocks",
custom: {
relationshipEnhancer: {
relationshipIntegrity: true,
biDirectional: [
{
relationTo: "a",
path: "amixedblocks",
},
{
relationTo: "b",
path: "bmixedblocks",
},
],
},
},
},
{
type: "relationship",
relationTo: "a",
hasMany: true,
name: "cmixedblocks2",
custom: {
relationshipEnhancer: {
relationshipIntegrity: true,
biDirectional: [
{
relationTo: "a",
path: "amixedblocks2",
},
],
},
},
},
],
};
export default C;
Metadata
Metadata
Assignees
Labels
No labels