Here is very simple relation type that can be used to repeat this bug.
$relation_type = new stdClass();
$relation_type->disabled = FALSE; /* Edit this to true to make a default relation_type disabled initially */
$relation_type->api_version = 1;
$relation_type->relation_type = 'friends_with';
$relation_type->label = 'Friends with';
$relation_type->reverse_label = 'Friends with';
$relation_type->directional = 0;
$relation_type->transitive = 0;
$relation_type->r_unique = 1;
$relation_type->min_arity = 2;
$relation_type->max_arity = 2;
$relation_type->source_bundles = array(
0 => 'user:user',
);
$relation_type->target_bundles = array();
Generating relations works if above relation was defined as user:*, but user:user won't work. Quick debugging shows that EFQ condition: entityCondition('bundle', 'user') is where this fails.
Comments
Comment #1
mikran commentedAttached patch skips the bundle condition for entities with just one bundle.
Comment #2
mikran commented