public static DaoReferenceObjectWithForeignKey OneWhere(QiQuery where, Database db = null)
        {
            var results = new DaoReferenceObjectWithForeignKeyCollection(Select <DaoReferenceObjectWithForeignKeyColumns> .From <DaoReferenceObjectWithForeignKey>().Where(where, db));

            return(OneOrThrow(results));
        }