메일링 리스트 webobjects-dev@wocommunity.org 메시지 #551
보낸 사람: Aaron Rosenzweig <aaron@chatnbike.com>
제목: Re: [WO-DEV] validateForSave() question
일자: Mon, 23 Feb 2026 19:52:53 -0500
받는 사람: WebObjects & WOnder Development <webobjects-dev@wocommunity.org>
참조: Theodore Petrosky <tedpet5@yahoo.com>
If it’s strictly a toMany relationship, I don’t see how they could be added twice.

Is it a many-to-many? In that case, the same person could be added twice. In that case, I’d put the validateForInsert() on the join table. I’d try to find at least one other join table pointing to the same person and entity.

> On Feb 23, 2026, at 5:50 PM, Theodore Petrosky <tedpet5@yahoo.com> wrote:
>
> I am trying to add a check in validateForSave. my entity has a toMany relation with my Person entity. I need to  check if a person has been added twice.
>
> So basically, if Jon has been added twice throw the validation exception. so I guess, here is an array of persons, are they all unique?
>
> Am I being clear?
>
> public void validateForSave() throws NSValidation.ValidationException {
>
> Ted
>
> BTW, I tried to send this to webobjects-dev@lists.apple.com, but it looks like it has been down for a couple of days or longer.
>
>
> #############################################################
> This message is sent to you because you are subscribed to
> the mailing list <webobjects-dev@wocommunity.org>.
> To unsubscribe, E-mail to: <webobjects-dev-off@wocommunity.org>
> To switch to the DIGEST mode, E-mail to <webobjects-dev-digest@wocommunity.org>
> To switch to the INDEX mode, E-mail to <webobjects-dev-index@wocommunity.org>
> Send administrative queries to  <webobjects-dev-request@wocommunity.org>
>

가입 (FEED) 가입 (DIGEST) 가입 (INDEX) 탈퇴 Listmaster에게 메일 보내기