Hi Tim,
On 03/06/2014, at 6:41 AM, Timothy Worman <[email protected]> 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 protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]