Re: partials and migrations
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