• 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: Problem EOEditingContext
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem EOEditingContext


  • Subject: Re: Problem EOEditingContext
  • From: David Holt <email@hidden>
  • Date: Thu, 12 Jul 2012 16:57:48 -0700


On 2012-07-12, at 3:49 PM, Hugo Cambero wrote:

Thanks for your answers, yes I found a method like this:

public static User createUser(EOEditingContext editingContext, String maternalName
, String name
, String password
, String paternalName
, String username)

Any attributes in this constructor tells you that you have marked them as required in your model. 

David



But I prefer to user the method like this:
User newUser = ERXEOControlUtilities.createAndInsertObject(ec, User.class );

On Thu, Jul 12, 2012 at 5:39 PM, Lon Varscsak <email@hidden> wrote:
Oh, I like that!

-Lon

On Thu, Jul 12, 2012 at 3:26 PM, Maik Musall <email@hidden> wrote:
>
> Am 12.07.2012 um 23:58 schrieb Louis Demers:
>> User newUser = (User)EOUtilities.createAndInsertInstance(ec, User.ENTITY_NAME) ;
>
> Much too wordy for my taste, and needs a cast on top of it. Just add a second constructor in your template which does ec.insertObject(this), so that you can simply use
>
>         User newUser = new User( ec );
>
> Do not delete the parameter-less constructor though, because EOF needs that internally when restoring objects from db. But refrain from using that anywhere in your app.
>
> Maik
>  _______________________________________________
> 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
 _______________________________________________
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

 _______________________________________________
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

References: 
 >Problem EOEditingContext (From: Hugo Cambero <email@hidden>)
 >Re: Problem EOEditingContext (From: Louis Demers <email@hidden>)
 >Re: Problem EOEditingContext (From: Maik Musall <email@hidden>)
 >Re: Problem EOEditingContext (From: Lon Varscsak <email@hidden>)
 >Re: Problem EOEditingContext (From: Hugo Cambero <email@hidden>)

  • Prev by Date: Re: Problem EOEditingContext
  • Next by Date: Re: ERXFlickrBatchNavigation & Robots
  • Previous by thread: Re: Problem EOEditingContext
  • Next by thread: Re: Problem EOEditingContext
  • Index(es):
    • Date
    • Thread