Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unique values for combination of columns in Hybris Impex Files

I'm creating a Hybris impex file to import into my Database.

I want to perform an INSERT_UPDATE action with the data from the file, so I need to tell Hybris which column(s) need to be unique, so that it knows when to update a record instead of insert it.

I know that to tell Hybris that a certain column needs to be unique I can add the unique attribute to that column, like this:

INSERT_UPDATE SLEmployee;Firstname[unique=true, required=true];Lastname[required=true];Function;

But on my example above, how do I tell Hybris that the combination of the columns Firstname + Lastname must be unique?

like image 819
Henrique Ordine Avatar asked Oct 03 '12 12:10

Henrique Ordine


1 Answers

> how do I tell Hybris that the combination of the 
> columns Firstname + Lastname must be unique?

Add the unique keyword to every field that is part of the combined key

 INSERT_UPDATE SLEmployee;Firstname[unique=true];Lastname[unique=true];Function;
like image 84
k3b Avatar answered Oct 21 '22 01:10

k3b