Thursday 12 May 2011 8:50:13 am
RemoteID is an identifier that you can define in order to retrieve content from external data. For instance, if you are importing an RSS feed, this could be the GUID of each item in the feed. Or if you're migrating data from another database, it could be a primary key (keep in mind that this RemoteID MUST remain unique in eZ Publish database though). A best practice would be to build your RemoteID with a prefix (ie. my-import-category-<primary_key>). Of course, if you set a remote id with something that can be changed in the future, you'll have some issues for sure ! :). So don't use a name for instance. It should be unique. Behind the scenes, SQLIContent::create() checks if a content already exists with that RemoteID, and if yes will return it so you can update it. Is it clearer now ?
|