rabbit-orm
rabbit-orm copied to clipboard
Basic example results in error, is this library still supported?
trafficstars
I am trying to install this library to a new installation of CI 3.1.2, and running the simplest example, like the User one of the documentation.
First it fails to load "DefinitionReader.php", when I renamed the file to "Definitionreader.php" it continued.
but now it gives the error:
Error Number: 1054
Unknown column 'id' in 'field list'
SELECT id as 'idUser', title as 'title'
Filename: libraries/rabbit-orm/RabbitORM/Result.php
Line Number: 18
I have the db connection working, the database is valid, I set the table name in userDefenition json, I have the table users, but it simply fails to work.
I have it working with this model:
class Rights extends RabbitORM\Model {
var $table = 'rights';
var $incrementing = TRUE;
const RightsDefinition = '{"name": "Rights", "table": "rights"}';
private $id;
const idDefinition = '{"name": "id", "column": "id", "primaryKey": "true"}';
private $name;
const nameDefinition = '{"name": "name", "column": "name"}';