Share » Forums » Extensions » sqliimport > remote_id

sqliimport > remote_id

sqliimport > remote_id

Thursday 12 May 2011 6:42:13 am - 3 replies

Author Message

Jérôme Vieilledent

Thursday 12 May 2011 6:50:52 am

Hi Michael

This is automatic. See this topic reply I made on this subject earlier : http://share.ez.no/forums/extensions/sqliimport-search-if-attribute-value-already-exists#comment67758

Cheers !

Michael Loibl

Thursday 12 May 2011 7:38:22 am

Hi Jérôme,

i change the line:

<code>

'remote_id' => (string)$row->guid

</code>

to:

<code>

'remote_id' => (string)$row->Name

</code>

now the remote_id is the object name... and I can update the object...

How does it work with the generated remote_id > "5886cb82fd49d45ef4dff18311af4351"

Sorry - I don't get it...

Jérôme Vieilledent

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 ?

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu