Add Gallery_ORM::_initialize() to make the table name generation compatible with Gallery ("Model_FooBar" -> "foo_bars", not "foobars")