Re: EO has no attribute id?
Re: EO has no attribute id?
- Subject: Re: EO has no attribute id?
- From: Ray Kiddy <email@hidden>
- Date: Thu, 28 Aug 2014 13:46:36 -0700
Might be a problem with prototypes in the EOModel. You probably used the
'id' prototype for the primary key column of the table, yes?
If so, then manually specify the column name in the EOModel. If it says
it is not set, then that probably means that it is not set. For
whatever reason.
Perhaps the plugin for the type of database you are using has not
defined the prototypes correctly.
- ray
On Thu, 28 Aug 2014 15:56:47 -0400 Theodore Petrosky
<email@hidden> wrote:
> I just created a new Wonder Framework with a single Entity and two
> attributes (id, and newAttribute)
>
> I created the migrations and all looks good.
>
> I created a new Wonder D2W app and added my framework to the build
> path.
>
> I ran the app and the migrations ran fine I see in my db:
>
> mytest=# \d newentity
> Table "public.newentity"
> Column | Type |
> Modifiers
> --------------+---------+-----------------------------------------------------
> id | integer | not null default
> nextval('newentity_seq'::regclass) newattribute | text | not null
> Indexes: "newentity_pk" PRIMARY KEY, btree (id)
>
> mytest=#
>
> But when I try to see what is in my database, I click the find button
> on the home screen and the app crashes with:
>
>
> Error: java.lang.IllegalStateException: sqlStringForAttribute:
> attempt to generate SQL for attribute 'id' on entity 'NewEntity' with
> undefined column name. You must define a column name for this
> attribute before attempting a database operation. Reason:
> sqlStringForAttribute: attempt to generate SQL for attribute 'id' on
> entity 'NewEntity' with undefined column name. You must define a
> column name for this attribute before attempting a database operation.
>
> no attribute ‘id’?
>
> I examined the build path, and I don’t see that I am missing any
> frameworks, but I don’t get it. I have data in my db:
>
> mytest=# select * from newentity;
> id | newattribute
> ----+----------------
> 1 | this is a test
> (1 row)
>
> mytest=#
>
> Am I missing a framework? I have done this 50 times in the last few
> months and it worked fine.
>
> Ted
_______________________________________________
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