Re: testing d2w
Re: testing d2w
- Subject: Re: testing d2w
- From: Wes James <email@hidden>
- Date: Wed, 27 Oct 2004 08:25:46 -0600
On Wed, 27 Oct 2004 08:19:45 -0600, Wes James <email@hidden> wrote:
> On Wed, 27 Oct 2004 05:45:59 +0100, Clive Roberts
>
>
> <email@hidden> wrote:
> > 26, 2004 10:51 PM
> > Subject: testing d2w
> >
> >
> >
> >
> > > I put together a simple model
> > > users
> > > userTypeID
> > > password
> > > userID (key row)
> > > userName
> > >
> > > userTypes
> > > userTypeDef
> > > userTypeID (key row)
> > >
> > > I then set up the relationship from the userTypes.userTypeID to
> > > users.userTypeID as 1 to many.
> > >
> > > I then create the tables then use Xcode to create a D2W application.
> > > I build and run.... When I get in and select userTypes and then click
> > > on New to create a new usertype I can type in Admin as a new user
> > > type, but it also has an area to put in users. Why?
> >
> > it is just reflecting the 1 to many relationship from users to userTypes.
> >
> > Ok. I then
> > > select the dropdown menu and select users, click on new to create a
> > > new user.
> >
> > try creating the "Admin" type without creating the new user, ie don't bother
> > about adding users at first.
> >
>
> I did. I create an admin userType and one other. When I click on the
> New button for Users and then type in a username and a password and
> then click on the button to select a userTypes then click on Return
> after selecting Admin, Admin is there but when I click on the Save
> button to save this record, I get:
>
> Could not save your changes:
> The userTypeID property of Users is not allowed to be null.
>
> The userTypeID is a key value - shouldn't the D2W system create an
> autoid for userTypeID?
OK, I went back to my EOmodel and the userTypeID in the Users table
was not a key value. I changed it to a keyed field and no when I try
to add a new record I get:
Application:
Test3
Error:
java.lang.IllegalStateException: Adaptor
com.webobjects.jdbcadaptor.JDBCAdaptor@ce38f1 failed to provide new
primary keys for entity 'Users'
Reason:
Adaptor com.webobjects.jdbcadaptor.JDBCAdaptor@ce38f1 failed to
provide new primary keys for entity 'Users'
There should be a table of user types that can be used in the Users
table - the userTypeID should be put into the userTypeID in the Users
table on save shouldn't it?
wes
_______________________________________________
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