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

D2W creating a new object?


  • Subject: D2W creating a new object?
  • From: Theodore Petrosky <email@hidden>
  • Date: Thu, 05 Apr 2012 10:53:25 -0700 (PDT)

I am creating a new 'Brief' object in my D2W app like this:

public EditPageInterface createBriefAction() {

	EditPageInterface component = D2W.factory().editPageForNewObjectWithConfigurationNamed("CreateBrief", session());
	component.setNextPage(session().context().page());

	if(component instanceof D2WPage) {
		D2WPage page = (D2WPage)component;
		page.d2wContext().takeValueForKey("Brief.CreateBrief", "navigationState");
		NSLog.out.appendln( ((D2WPage) component).object().allPropertyKeys());

		Person thePerson = session().user().localInstanceIn(((D2WPage) component).object().editingContext());

		((D2WComponent) component).object().takeValueForKey( thePerson, "person");
		((D2WComponent) component).object().takeValueForKey( (new NSTimestamp()), "creationDate");//  (new NSTimestamp());

     }
   return component;
}

When I click the save button I am getting:


IllegalStateException: Adaptor com.webobjects.jdbcadaptor.JDBCAdaptor@43c8308 failed to provide new primary keys for entity 'Brief'


Am I supposed to do something more here?

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

  • Follow-Ups:
    • Re: D2W creating a new object?
      • From: David Holt <email@hidden>
  • Prev by Date: Re: Another… What ate my Javascript in my AMD?
  • Next by Date: debugging ERXMainRunner v Application
  • Previous by thread: Re: Wonder reminder: switching to integration branch
  • Next by thread: Re: D2W creating a new object?
  • Index(es):
    • Date
    • Thread