lib/core/entity/metadata/ColumnDecorators.js
function Id() {
    return function (targetObject, propertyKey) {
        var entityMetadata = targetObject;
        if (entityMetadata.idProperty) {
            throw "Cannot set primary key to '" + propertyKey + "', it is already set to '" + entityMetadata.idProperty + "'";
        }
        entityMetadata.idProperty = propertyKey;
    };
}
function Id() {
    return function (targetObject, propertyKey) {
        var entityMetadata = targetObject;
        if (entityMetadata.idProperty) {
            throw "Cannot set primary key to '" + propertyKey + "', it is already set to '" + entityMetadata.idProperty + "'";
        }
        entityMetadata.idProperty = propertyKey;
    };
}
Created by Papa on 8/20/2016.
 
Annotates Id fields of Entities.

@returns {function(any, string)}
@constructor