rabbit-orm icon indicating copy to clipboard operation
rabbit-orm copied to clipboard

Basic example results in error, is this library still supported?

Open mcbyte-it opened this issue 8 years ago • 1 comments
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.

mcbyte-it avatar Dec 23 '16 14:12 mcbyte-it

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"}';

tomislav12 avatar May 25 '17 14:05 tomislav12