I've got an entity type which has a db column that's a serialized array of data.

The Entity Info API lets me declare that as a 'struct' type property, and then declare the elements within that array as sub-properties.

It would be nice if these appeared as sub-fields in the Migrate destinations. I can get that part to happen, but I'm stumped as to how (and where!!) to actually copy the data in from the migrate row object to the new entity.

Comments

mikeryan’s picture

Status: Active » Postponed (maintainer needs more info)

MigrateDestinationEntityAPI::import()?

joachim’s picture

Status: Postponed (maintainer needs more info) » Active

But that's a monster that subclasses can't easily override, because it tackles both assembling the entity object and saving it.

Would prepare() be a better fit?

mikeryan’s picture

Sure, prepare() would do it.