• 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: partials and migrations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: partials and migrations


  • Subject: Re: partials and migrations
  • From: Paul Hoadley <email@hidden>
  • Date: Tue, 03 Jun 2014 19:53:40 +0930

Hi Tim,

On 03/06/2014, at 6:41 AM, Timothy Worman <email@hidden> wrote:

> I’m just wondering before I head down this road - does migrations work OK with partial entities? I’m specifically wondering about a partial entity that might share a few class attributes. I wouldn’t want migrations to try to create the same fields twice in the database.

The short answer is: I use migrations with partial entities, and it works well.

The slightly longer answer is that the generated migration code tries to create the table for the base ("parent") entity as well when you're creating a partial—so that if you have, say, "User" in a framework with its own initial migration code, and you're creating an "AppUser" partial in the application, then the latter will try and create the "User" table itself from scratch.  You'll need to scour over the initial migration class and make sure it's appropriate.  Of course, if you're not doing the migration for the base entity somewhere else, it's completely fine—just depends on how you've set things up.


--
Paul Hoadley
http://logicsquad.net/




 _______________________________________________
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: 
 >partials and migrations (From: Timothy Worman <email@hidden>)

  • Prev by Date: partials and migrations
  • Next by Date: apache adaptor settings
  • Previous by thread: partials and migrations
  • Next by thread: apache adaptor settings
  • Index(es):
    • Date
    • Thread