Use table name as key in factory