Google Groups Home
Help | Sign in
composite key with unique constraint
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Adam Huttler  
View profile
 More options 2 Jul, 10:55
From: Adam Huttler <adam.hutt...@fracturedatlas.org>
Date: Wed, 2 Jul 2008 02:55:25 -0700 (PDT)
Local: Wed 2 Jul 2008 10:55
Subject: composite key with unique constraint
Hi,

I have a table that has a composite key with a unique constraint.
This is defined on the database level.  Is there a simple way to have
Doctrine enforce this on the application level?  I could use
validate() logic, but it would be better to simply define it in
setTableDefinition() somehow.

Thanks,
Adam


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan Wage  
View profile
 More options 2 Jul, 16:10
From: "Jonathan Wage" <jonw...@gmail.com>
Date: Wed, 2 Jul 2008 10:10:46 -0500
Local: Wed 2 Jul 2008 16:10
Subject: Re: [doctrine-user] composite key with unique constraint

Not currently. Their is no application level unique validation for composite
primary keys. You can use a unique index on the columns to enforce this on
the database level though.

- Jon

On Wed, Jul 2, 2008 at 4:55 AM, Adam Huttler <

adam.hutt...@fracturedatlas.org> wrote:

> Hi,

> I have a table that has a composite key with a unique constraint.
> This is defined on the database level.  Is there a simple way to have
> Doctrine enforce this on the application level?  I could use
> validate() logic, but it would be better to simply define it in
> setTableDefinition() somehow.

> Thanks,
> Adam

--
Jonathan Wage
http://www.jwage.com
http://www.centresource.com

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google