Questions tagged as 'relaciones'

0
answers

Laravel-How can I insert in tables with many-to-many relationship when I have foreign keys created in mysql through migrations?

When I submit the form, it shows me this: error: Integrity constraint violation: 1452 Can not add or update to child row: a foreign key constraint fails (bolsa_empleo.aplicante_empleo, CONSTRAINT aplicantes_empleo_aplicante_usuario_id_foreign FO...
asked by 02.10.2018 / 14:08
1
answer

Is this controller code correct?

Is this driver code correct? $product = Product::find($id)->with('dsa'); using only this $product = Product::find($id); works correctly for me but when I try to add the related table I do not get it and tried it in a thousand ways a...
asked by 05.10.2018 / 12:30
2
answers

Laravel problem with pivot table

I have two tables: one for travel and another for clients. In the pivot table it relates to each other in ManyToMany. In the migration of the pivot table I have the following: <?php use Illuminate\Support\Facades\Schema; use Illuminate\...
asked by 04.12.2018 / 21:59
1
answer

PROBLEM RELATIONSHIPS LARAVEL TABLES

I need your help, I am making a list of tables in laravel with migration, which tables are 'Products', 'inputs' and 'ProductProduct', the relationship or database would be from 1 to many (1 product has N inputs) but this error appears:    121...
asked by 04.11.2018 / 22:11
1
answer

Model Relations in Angular 5

Any ideas on how to work my backend relationships in Angularn5 (frontend)? I have DjangoRest as a backend and I am using Angular5 as a frontend, and I get the data through http in json format, but I have the problem when dealing with backend...
asked by 24.10.2018 / 17:28
0
answers

HOW TO EXPORT PRIMARY KEYS TO MAKE RELATIONSHIP BETWEEN TABLES

I have a problem, I need to export the primary keys of three tables to a new table to be able to relate these three tables, I know how to do the foreigner but that export term confuses me a bit. I hope you understand my question. There I send...
asked by 26.10.2018 / 07:00
0
answers

Help in relational model for a Time Tracking system

I proceed to explain what the project that I just started is about to explain my concern. It is a time tracking system but at its most basic level, nothing compared to the large systems that already exist (primaERP, Harvest etc) in which the...
asked by 20.05.2018 / 05:25
2
answers

Laravel soft delete in pivot tables

I have a m-n relationship between two tables using a pivot table. In the migration of the pivot table, I created it with a deleted_at field, using the softDeletes() method, like this: public function up() { Schema::cre...
asked by 29.12.2018 / 14:31
0
answers

Databases relationships

this database is new to me, I have searched my query before but I messed with the answers because the questions are not the same as mine, maybe similar but I can not relate the answers to my question, because what I leave my query here. I am...
asked by 14.12.2018 / 20:50
0
answers

Relate tables with string type fields with laravel

I have some tables already related from the migration since the fields are of type int and contain a single value: $table->unsignedInteger('user_id'); $table->foreign('user_id')->references('id')->on('users'); $table->unsignedIn...
asked by 08.10.2018 / 14:25