• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: unique contraint error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unique contraint error


  • Subject: Re: unique contraint error
  • From: Christoph Wick <email@hidden>
  • Date: Wed, 21 Aug 2013 19:22:49 +0200

Is there a documentation about the possible keys for that? What kinds of keys can I put into a ValidationTemplates.string?

Thx, C.U.CW
--
What are the three enemies of a programmer? Sunlight, oxygen, and the appalling roar of the birds.

On 14.08.2013, at 04:07, Theodore Petrosky <email@hidden> wrote:

> wow, that's beautiful
>
>
>
> On Aug 13, 2013, at 8:45 PM, Paul Hoadley <email@hidden> wrote:
>
>> Hi Ted,
>>
>> On 14/08/2013, at 10:03 AM, Theodore Petrosky <email@hidden> wrote:
>>
>>> I added an index and unique constraint to my User. loginName column.
>>>
>>> I see in the logs that when I try to violate the uniqueness my d2w does the correct thing and complain however this is the error:
>>>
>>> Could not save your changes: CustomMethodException
>>>
>>> I do see in the logs:
>>>
>>> ERROR: duplicate key value violates unique constraint "loginname_idx"
>>>
>>> did I miss something in a rule to pass the better worded error message to the user?
>>
>> Create Resources/English.lproj/ValidationTemplate.strings and add:
>>
>> {
>> 	"UniqueConstraintException.loginname_idx" = "Please choose a different username.";
>> }
>>
>> Does that work?
>>
>>
>> --
>> Paul Hoadley
>> http://logicsquad.net/
>>
>>
>>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: unique contraint error
      • From: Ramsey Gurley <email@hidden>
References: 
 >unique contraint error (From: Theodore Petrosky <email@hidden>)
 >Re: unique contraint error (From: Paul Hoadley <email@hidden>)
 >Re: unique contraint error (From: Theodore Petrosky <email@hidden>)

  • Prev by Date: Re: where do I look
  • Next by Date: Re: unique contraint error
  • Previous by thread: Re: unique contraint error
  • Next by thread: Re: unique contraint error
  • Index(es):
    • Date
    • Thread