1
0
Fork 0
mirror of synced 2024-10-06 04:54:52 +13:00

Ignore primary touched if isMany

This commit is contained in:
Mel O'Hagan 2023-01-19 14:29:47 +00:00
parent b4dcdfa84f
commit 50e571c1de

View file

@ -95,7 +95,7 @@
if ($touched.toCol && !fromRelate.name) { if ($touched.toCol && !fromRelate.name) {
errObj.toCol = colNotSet errObj.toCol = colNotSet
} }
if ($touched.primary && !fromPrimary) { if ($touched.primary && !isMany && !fromPrimary) {
errObj.primary = "Please pick the primary key" errObj.primary = "Please pick the primary key"
} }
// currently don't support relationships back onto the table itself, needs to relate out // currently don't support relationships back onto the table itself, needs to relate out
@ -152,6 +152,8 @@
Object.keys($touched).length !== 0 && Object.keys($touched).length !== 0 &&
fromTable && fromTable &&
toTable toTable
$: console.log("Errors ", errors)
$: linkTable = through || toTable $: linkTable = through || toTable
$: relationshipTypes = [ $: relationshipTypes = [
{ {