Re: Why can't I save an instance of this enterprise object?
"Jerry W. Walker" <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, Matt,
I've never seen this error, but it looks like you may not have
defined abHistorySet as an Enterprise Object, that is, one which is
entity based through an EOModel.
Be sure you have an EOModel registered with the project in which
there is an Entity that maps abHistorySet to some table in the database.
It's also conventional to capitalize the first letter of classes (and
Entities) in the form "AbHistorySet" and use the form "abHistorySet"
for an instance of the class.
If your abHistorySet corresponds to some table (or part thereof) in
an existing database, EOModeler can generate an initial EOModel for
you. If not, you will have to generate one from scratch.
HTH.
Regards,
Jerry
On Jan 27, 2006, at 12:07 AM, Matt Kime wrote:
> i'm using some very basic code to create an save an enterprise object.
> i've tried it with another object and it works fine. i've never see
> the error below. does anyone know what causes it?
>
> many thanks,
> matt
>
> protected abHistorySet testSet;
>
> public exhibitionsOpening(WOContext context) {
> super(context);
>
> testSet = new abHistorySet();
> session().defaultEditingContext().insertObject(testSet);
> session().defaultEditingContext().saveChanges();
>
> }
>
> Error: java.lang.IllegalStateException: Unable to find entity for
> object {values = {status = ; values = (); entityName = ; rowid = ;
> dateCreated = ; entityID = ; }; this = ">"; }
>
> Reason: Unable to find entity for object {values = {status =
> <com.webobjects.foundation.NSKeyValueCoding$Null>; values = ();
> entityName = <com.webobjects.foundation.NSKeyValueCoding$Null>; rowid
> = <com.webobjects.foundation.NSKeyValueCoding$Null>; dateCreated =
> <com.webobjects.foundation.NSKeyValueCoding$Null>; entityID =
> <com.webobjects.foundation.NSKeyValueCoding$Null>; }; this =
> "<abHistorySet abc94 <EOTemporaryGlobalID: 0 0 -64 -88 0 40 0 0 -61 85
> 1 0 0 0 1 9 10 53 -14 -92 53 -42 -78 67>>"; }
> _______________________________________________
> WebObjects-dev mailing list
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/webobjects-dev
--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial
Strength Internet Enabled Systems
[email protected]
203 278-4085 office