Hello, I'm using Active Record on a project that uses the repository
pattern (ActiveRecordMediator class) and I'm quite new to this API. I
have the following property on an entity class:

[HasMany(typeof(System.String), "DocumentEntryId",
"DocumentEntryGrantedPermissions", RelationType = RelationType.Map,
                 Cascade = ManyRelationCascadeEnum.AllDeleteOrphan,
Lazy = true, Index = "UserName", IndexType = "System.String",
                 Element = "Permissions")]
public IDictionary<string, string> GrantedPermissions
{
    get { return _grantedPermissions; }
    set { _grantedPermissions = value; }
}

I would like to know how to build a HQL query or criteria API query to
retrieve ONLY that property from the database. So far I've built the
following HQL query, but returns "null":

StringBuilder sb = new StringBuilder()
        .Append("select grantedPermissions from DocumentEntryEntity as
documentEntry ")
        .Append("inner join documentEntry.GrantedPermissions as
grantedPermissions ")
        .AppendFormat("where documentEntry.Id = '{0}' ",
id.ToString());

Any help on this, please?

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to