• 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: Simple question: inserting data right after table creation (on migration?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple question: inserting data right after table creation (on migration?)


  • Subject: Re: Simple question: inserting data right after table creation (on migration?)
  • From: Theodore Petrosky <email@hidden>
  • Date: Sun, 16 Dec 2012 07:05:14 -0800 (PST)

i have done my sql directly after the foreign key creation with this:

ERXJDBCUtilities.executeUpdate(database.adaptorChannel(), "INSERT INTO brieflogo (iscurrent, logotitle) VALUES (true, 'AgencySacks')");

this way what ever sql I am creating directly relates to the migration at hand.

Ted


--- On Sun, 12/16/12, Flavio Donadio <email@hidden> wrote:

> From: Flavio Donadio <email@hidden>
> Subject: Simple question: inserting data right after table creation (on migration?)
> To: "WebObjects Development" <email@hidden>
> Date: Sunday, December 16, 2012, 9:23 AM
> Hello, people!
>
>
> I think I already know the answer, but I need to check
> first...
>
> I want to create a default user on my WO App when the app is
> first run. So, I need to create a User entity and insert it
> right after my tables are created, which is automatically
> done through a migration.
>
> Is it safe to insert my code right after this?
>
>     userTable.create();
>     userTable.setPrimaryKey("id");
>
> Or would I need something else? Is this right, optimal
> and/or safe?
>
>
> Regards,
> Flavio
>  _______________________________________________
> 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: 
 >Simple question: inserting data right after table creation (on migration?) (From: Flavio Donadio <email@hidden>)

  • Prev by Date: Re: D2W and ERAttachment
  • Next by Date: Re: Simple question: inserting data right after table creation (on migration?)
  • Previous by thread: Connection validation, auto reconnect
  • Next by thread: D2W and ERAttachment
  • Index(es):
    • Date
    • Thread