elgg_get_entities_from_relationship with metadata problem

Hello,

I have many entity "territory", they have many relationship "has_animal" to entities "animal".

I can get all "animal" of a territory with :

elgg_get_entities_from_relationship(array(
'relationship' => 'has_animal',
'relationship_guid' => GUID_OF_THE_TERRITORY
));

But i want to get a "animal" with the title "Rabbit", i have test this but it's don't work :

elgg_get_entities_from_relationship(array(
'relationship' => 'has_animal',
'relationship_guid' => GUID_OF_THE_TERRITORY,
'metadata_name'  => 'title',
'metadata_value'  => 'Rabbit',
'limit'  => 1

));

 

It's return a array empty.. :s

 

Good day,

Syntaxlb