Hi, im creating a package, im extending my package class with ORM model, but after doing this it is always checking in database for table same as my class. i want my class to use queries like query builder and generate a specific output
The ORM model needs to know the definition of your table, and all columns. If you haven't defined them (in $_properties), the model with run a query to determine them at runtime.
it means i have to define table name in properties, i want to make it general, i want all features of query builder,i have extend my class with \Fuel\Core\DB but when i'm chaining it with select i am getting error. with out extending with DB i have create package class and it works great but i want to extend it with db class so i will not put select, where or from function in my class for stuff already exist.
error i'm getting
ErrorException [ Error ]: Call to undefined method Fuel\Core\Database_Query_Builder_Select::edit_column()
Properties don't have anything to do with the table name, but with the column names. See http://docs.fuelphp.com/packages/orm/creating_models.html#/propperties.
It is therefore not something you define in a base model that is meant to be extended, you define it in the final model.
A model is not a DB class, and can not (and should not) be extended this way. Perhaps you should start with telling us what exactly you want to achieve, because I have a feeling you're flying all over the place...
actually first i tried package class with orm then i decide to use DB class actually i'm porting ignited datatables for fuel it working fine without extending orm or db class by with query builder in class methods like(select , where, join), now i am trying to extend it with DB so it will query the database and will generate output for jquery datatables,
Really sorry for trouble because of my questions.