major error with database abstraction layer prevented inventory from working