I have a collection of entities with an any-association, like this:
public class CreatedLog
{
public string Message { get; set; }
public EntityBase CreatedEntity { get; set; } // an association to any entity
}
Is there a way - through HQL or Criteria API - to find only the log entries, that are for a specific entity-type?
Like
session.CreateCriteria<CreatedLog>()
.Add(Restriction.Eq("CreatedEntityType", "Note"));