public virtual BlogApp GetFirstByUser(int ownerId) { return(BlogApp.find("OwnerId=" + ownerId + " and OwnerType=:OwnerType") .set("OwnerType", typeof(User).FullName) .first()); }