There is a great module for unique fields in nodes.

http://drupal.org/project/unique_field

I want the same function but in Relation module.

Comments

rafamd’s picture

Title: I need to set unique fields in relation. » Allow setting unique constraint to fields in relation.
Status: Active » Closed (won't fix)

Hi @MeDAN, relation module works with custom entities and unique_field module seems to implement the feature just for node entities (not as a generic entity solution), so yes, I guess it would not work with relation entities.

However, I think this feature is out of the scope of relation module (maintainers, correct me if I'm wrong).

IMHO, this feature should live in the same unique_field module, in the 7.x version and thus be useful not only to relation module but to any other module using custom entities. Maybe opening an issue over that module's queue is a better idea.

I'm closing to housekeep the queue, feel free to reopen.

EDIT: you can "move" this issue to unique_field module's queue by changing the "Project" autocomplete field when posting your comment.

MeDAN’s picture

Project: Relation » Unique field

Thanks rafamd!

Ok, I moved this issue to the Unique field module. I'm waiting for the maintainers answer.

MeDAN’s picture

Status: Closed (won't fix) » Active

Oh I forgot to reopen it. :)

johnv’s picture

does/will the following issue resolve your issue ? #1094582: Support (Entity) Fields in general, not only on nodes

sven.lauer’s picture

I just stumbled upon this issue ... it seems to me that the OP wants http://drupal.org/project/relation_unique .

Not quite sure how this could be implemented in unique_field, given that relations are not fields ...

AstonVictor’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

I'm closing it because the issue was created a long time ago without any further steps.

if you still need it then raise a new one.
thanks