Circular parent/child relationship in database -
i have parent many children, fine. against each parent trying store default_child. want make default_child mandatory can not think how this.
creating parent first mean violating mandatory default_child condition. creating child first mean violating it's fk condition.
how others deal this? thanks!
constraints can typically marked "deferrable", means can ask database defer checking them until commit time. lets resolve situations 1 constraint needs violated temporarily while building transaction, satisfied again time you're ready commit.
Comments
Post a Comment