Questions tagged as 'model'

1
answer

Problem with insert in cakephp-mysql

Driver code public function fullClient() { // $information = $this->data['Cliente']['informacio']; $client = $this->data['Cliente']['cliente']; //$posicion_coincidencia = strrpos($cadena_de_texto, $cadena_bu...
asked by 27.03.2018 / 00:39
1
answer

Download a mongo model with NodeJS

I have a Mongo database and I would like, through an API in Node, to be able to download these records in zip, in a CSV or whatever format. Right now I have 501426 records so the find of the model gives me the following error when getting all th...
asked by 15.01.2018 / 16:40
0
answers

How to edit and delete in One to Many relationships with eloquent in laravel 5.1?

I have a 3 tables which have the following relationships: Events Table: public function modalitys() { return $this->hasMany('Deportes\Models\Modality', 'events_id'); } Modality Table: public function disc...
asked by 29.10.2017 / 13:13
1
answer

Does not return value with mutators in laravel 5.4

I have the following problem when using mutators to be able to generate a value that is inserted into the database: My model has a field called order responsible for carrying the position of a menu, when I generate a new menu I want yo...
asked by 23.11.2017 / 19:08
1
answer

Call to undefined method CI_DB_mysqli_result :: fetch_assoc ()

I use codeigniter and I want to traverse an array with a while but it gives me the following error    - > Call to undefined method CI_DB_mysqli_result :: fetch_assoc () while ($row=$mate->fetch_assoc()) { $mcID['mcID'...
asked by 10.07.2017 / 23:40
0
answers

scope for laravel of a relationship

I have a registration table and a student-related table, one to many, and I want to make a scope in the enrollment model in such a way that I look for the student's routine, at the moment I have a scope by date. How could I make that scope? this...
asked by 26.05.2017 / 00:10
1
answer

Laravel 5 Eloquent Model error

Hello Stackoverflow community, I have this error while I try to use query between models and relationships in Laravel 5.3: BadMethodCallException in Builder.php line 2450: Call to undefined method Illuminate \ Database \ Query \ Builder :: ad...
asked by 06.04.2017 / 22:11
0
answers

Error with calculator operands

I have a program that takes two values and adds them. I have an error in the controller, it tells me that it can not be converted from int to string. in this line: int result = Logica.Calculadora.Sumar(model.operando1, model.operando2) . W...
asked by 09.05.2017 / 19:13
0
answers

CakePHP and SqlServer query

I need to query a database with SQLServer and buy 2 dates the problem is that CakePHP puts '' to date and throws me error table.field> = '2017-03-25' and I need that look like this table.campo > = 2017-03-25     
asked by 25.03.2017 / 00:00
1
answer

I can not import model in route typescript

PS: Apart from the info below, here is the source: link The question is, why can not I access "User" which is a model for mongoose from a route? That's how I have the router. As you can see, User gives me an error "Can not fin...
asked by 05.12.2018 / 14:26