Хат #551 Тарату тізімі webobjects-dev@wocommunity.org
Кімнен: 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>
Cc: 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>
>

Жазылу (Тіке) Жазылу (Дайджест) Жазылу (Сөзбасы) Қол қойғаннан Listmaster жазу