• 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: D2W creating a new object?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: D2W creating a new object?


  • Subject: Re: D2W creating a new object?
  • From: Theodore Petrosky <email@hidden>
  • Date: Fri, 06 Apr 2012 09:43:55 -0700 (PDT)

I started typing about the table and I decided to go look and not trust my memory. I found my error.

I had created an index on jobNumber. I wanted to make sure that there were no duplicates. I was hoping that when a user tried to put in a duplicate jobNumber the error would case an error page to be generated.

In my haste to create the index, jobNumber was marked to be a primary key. Removing the primary key in EntityModeler fixed my problem.

Of course now I have the other problem of what to do when someone uses a conflicting jobNumber. I didn't get a pretty page saying oops your jobNumber is already in use. But at least I can now insert 'Briefs'.

Thanks for making me see the errors of my ways.

So, is there a d2w way to (or a property) that can check for duplicates in an attribute?

Is there an example of validation checking when I press that save button?



ted

--- On Fri, 4/6/12, David LeBer <email@hidden> wrote:

> From: David LeBer <email@hidden>
> Subject: Re: D2W creating a new object?
> To: "Theodore Petrosky" <email@hidden>
> Cc: "email@hidden Development" <email@hidden>
> Date: Friday, April 6, 2012, 11:58 AM
> Does the DB column type and model
> match?
>
> Is your EO_PK_TABLE up to date (though I think that would
> lead to a more explicit error)?
>
> D
>
> --
> David LeBer
> Codeferous Software
>
> On 2012-04-06, at 11:34 AM, Theodore Petrosky wrote:
>
> > the primary key is id modeled as an int and it is not
> exposed as a class property.
> >
> > Ted
> >
> > --- On Fri, 4/6/12, Ramsey Gurley <email@hidden>
> wrote:
> >
> >> From: Ramsey Gurley <email@hidden>
> >> Subject: Re: D2W creating a new object?
> >> To: "Theodore Petrosky" <email@hidden>
> >> Cc: "David LeBer" <email@hidden>,
> "email@hidden"
> <email@hidden>
> >> Date: Friday, April 6, 2012, 11:32 AM
> >>
> >> On Apr 6, 2012, at 8:21 AM, Theodore Petrosky
> wrote:
> >>
> >>> I should have also said that I still get the
> error:
> >>>
> >>>
> >> Error: 
>    java.lang.IllegalStateException:
> >> Adaptor
> com.webobjects.jdbcadaptor.JDBCAdaptor@7f1633fd
> >> failed to provide new primary keys for entity
> 'Brief'
> >>
> >> What is the primary key(s) for brief and how is it
> modeled?
> >> Is it a class property?  If the PK is exposed
> as a
> >> class property, you have to set it manually.
> >>
> >> Ramsey
> >>
> >>
>
>

 _______________________________________________
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: D2W creating a new object?
      • From: Ramsey Gurley <email@hidden>
References: 
 >Re: D2W creating a new object? (From: David LeBer <email@hidden>)

  • Prev by Date: Re: D2W creating a new object?
  • Next by Date: Re: D2W creating a new object?
  • Previous by thread: Re: D2W creating a new object?
  • Next by thread: Re: D2W creating a new object?
  • Index(es):
    • Date
    • Thread