Yipit/clay.js — Issue #5: relationship declaration should accept string as parameter
Author: gabrielfalcao
Created: 2011-12-06 03:01:51+00:00
State: open

When declaring relationships of models, it should be possible to declare strings instead of the object itself. This is useful for when declaring self-relationships.

Example:

```javascript
var Pipeline = models.declare("Pipeline", function(it, kind) {
it.has.field("name", kind.string);
it.has.many("instructions", "BuildInstruction", "pipeline");

it.validates.uniquenessOf("name");

it.has.getter('permalink', function(){
return '/pipeline/' + this.__id__;
});
});

```