Re: enforce no master without detail

From: Shakespeare <>
Date: Wed, 05 Aug 2009 12:12:09 +0200
Message-ID: <4a795af4$0$188$>

steph schreef:
> Hi,
> I'm just wondering ...
> what would be the most elegant way to enforce the rule "don't create a
> master without at least one detail"
> having a master-table and a detail-table connected via 1:n
> relationship? The desired behaviour should be an error being raised
> when committing an insert on the master-table where no details exist
> (similarily deleting the details and leaving the master should raise
> an error).
> thanks,
> stephan

Besides from rethinking your business constraints, you're question was answered in

Shakespeare Received on Wed Aug 05 2009 - 05:12:09 CDT

Original text of this message