Most voted "relationship" questions
An entity-relationship relationship model (MER) is an abstract and conceptual representation of data, information aspects of a business domain or its process requirements. Lately MER is being much implemented in database.
Learn more…161 questions
Sort by count of
-
0
votes1
answer254
viewsRelationship JPA, Spring, Angular,
I have a client record and I want to associate with this client a relationship of equipment but is not saving the relationship. on the model layer of the customer class I did so @OneToMany(cascade =…
-
0
votes0
answers49
viewsprogramming in Ruby on Rails
I have a form and include a table médicos, and this table has a field enum where you can choose the option of cooperativa, but I have to check on another table of cooperativa if this doctor has a…
-
0
votes2
answers718
viewsMysql - Create field to insert more than one value from another table
Next, it may seem like a basic question but I need to know, I’ll get right to the point: I have a register of Players and a register of games (tables), usually referenced. I need to know how to do…
-
0
votes1
answer51
viewsSQL relationship
Good evening, I am creating a small system in which I will have a form for Service, where the user will select a Customer, and there will be a checkbox for multiple choice for Services. Can anyone…
relationshipasked 8 years, 5 months ago João Paulo Siqueira 53 -
0
votes2
answers228
viewsCreate bi-directional relationship without using DTO?
Hello, I’m on a project and I need to do bidirectional relationship between two entities, the relationship is @OneToMany @ManyToOne, so far so good. But I wonder if there is any way to do it without…
-
0
votes0
answers24
viewsA product reference various sizes in the database. How to do?
Hello! I am developing a Java system with Postgresql, and now I have reached a stage where I am with a great difficulty. I have three tables that need to relate, are they: Product: code,…
-
0
votes1
answer104
viewsRemove return json relationship from Laravel’s Datatables package
I have the following code snippet using Standard and the Datatables package $products = Product::with('enterprise') ->select(['id', 'enterprise_id', 'name']) ->whereIn('enterprise_id', [1,…
-
0
votes0
answers659
viewsError Laravel 5.6 "Undefined Property"
I am trying to list an association table, in my case it is the class table, which associates employees (teachers) and students. I did a good search before posting this question but could not solve…
-
0
votes2
answers919
viewsJSON Infiito when using GET @Manytomany
I have two classes, of which you have a @Manytomany relationship generating the third table described in the code below: Card package br.com.rpgnext.deck.critical.model; import…
-
0
votes0
answers162
viewsError while doing Hibernate relationship with Java
Good afternoon guys! I have a question in Hibernate. I have the following case Person - Client - Supplier But I’m having trouble making the relationship. follows my codes New Error 18:50:34,405…
-
0
votes1
answer2833
viewsConditional class relationship diagram
I made a diagram and modeled the Partners class to involve customers, suppliers, service providers, etc., which will inherit attributes from the abstract classes Pessoa->Física or…
-
0
votes1
answer140
viewsLaravel 5.2 non-object problem in foreach
I’m trying to pull the information from this relationship as you can see below: Model: public function endereco(){ return $this->belongsTo('App\Models\End\Logradouro_Bairro'); } public function…
-
0
votes1
answer367
viewsOptimization Inserts Hibernate when there is relationship @Manytomany
Imagine the relationships: User has Many Permissions Permission has Many Users We can create a relationship of N para N as follows: User class. public class User { /*Many attributes here*/ private…
-
0
votes1
answer444
viewsAutomapper Relationship one for many - Model to Viewmodel (and vice versa)
MVC scenario, where Controller talks to Application who talks to Domain. I’m trying to map one to many with Automapper. This is my Model: public class Estado { public Guid EstadoId { get; set; }…
-
0
votes0
answers9
viewsRelationships UML diagram
Guys, I’d like some help understanding a situation. I need to do a dev course work. And I was in doubt about a class relationship. In the Image, we have the car class and the person class.…
-
0
votes1
answer649
viewsRelationship 1:1
I’m having problems in the relationship of my tables products and stock. The stock table is responsible for storing the quantity of each item in the products table and the date when the product went…
-
0
votes2
answers649
viewsError while doing relationship with Lockable
Call to Undefined method Illuminate Database Query Builder::belongTo() My Models <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class Imovel extends Model { //definindo nome…
-
0
votes1
answer276
viewsRelation Many to Many with id type UUID Laravel 5.4 Eloquent ORM
I’m following Laravel’s documentation to make that relationship with the id type uuid. In the relationship methods I specified the pivot table and the IDS fields, however I went to debug in Tinker…
-
0
votes1
answer983
viewsRelationship 1 - 1
I’m having a little trouble designing my relational database model. The idea follows the following principle:: It would have a login system, and for that a table user There would also be 3 types of…
-
0
votes1
answer68
viewsIs it possible to say that the scheme is normalized in 3FN?
Explaining the Context In the internet found an example of a scheme described in this way: account(num-conta, descr-conta, launching(num-lanc, tipolanc, data-lanc, valor-lanc)). Notice that the way…
-
0
votes1
answer1249
viewsCreate a Relationship Table (N:N) that relates to a Normal-Table and another Relationship-Table (N:N) in SQL Server 2014 Management Studio
I am trying to create this SQL Server Data Flock Script, but when I run the following error message: Msg 1776, Level 16, State 0, Line 161 There are no primary keys or candidates in the reference…
-
0
votes0
answers60
viewsDistant relationship with Laravel 5.5
Guys, I need some urgent help! I have the following situation: Tables: saidas id ... saidas_produto id_saida id_entrada_produto entradas_produtos id id_entrada id_produto ... entradas id ... My…
-
0
votes2
answers38
viewsError in customizing the default user registration Laravel Auth
Error after registering and redirecting PS: he makes the registration normally, and I can access normally, but always give this error! I made a modification only in the user register, I…
-
0
votes1
answer172
viewsRecursive query does not return records when the parent product and the child product have the same code
I have a table that maps a production line. The fields are: Product: Machine Output Product. Parentproduct: Input Product. Machine: Code of the machine. I’m using CTE s to get the data recursively.…
-
0
votes0
answers103
viewsdetach() method deleting more data
my detach method erases all data from the student table (it removes the data from the association table but deletes all data from another table) $team = Team::find($id);…
-
0
votes0
answers226
viewsSave a JSON to the database or create an intermediate table?
Good night! I am in a small Dilemma, I am building an application to control events,in this application I have an event that can have several guests in the Front end I am thinking of using a…
-
0
votes0
answers35
viewsMysql foreign key creation problem
I am trying to implement a 1:1 relationship between the Employee table and the User table, in Mysql Workbench, but when generating the Diagram I see that the relationship always remains at 1:n, even…
-
0
votes1
answer237
viewsProblem in Saving Many to Many Relationship with Core Entity Framework
I’m having trouble saving a relationship from many to many with Entity Framework Core I have the following entities [Table("quadros")] public class Quadro : BaseEntity { public bool Ativo { get;…
-
0
votes2
answers399
viewsHow to make a @foreach with Relationship Tables in Laravel
I’m using Laravel freamwork where in my database I have 2 tables: -> complainants (with the field 'id','complainant','typoacoes_id') -> typos (with id fields, 'name') Both are already with the…
-
0
votes2
answers35
viewsAm I having a problem in the Manytomany relationship in Dallas if someone help me ouder?
I’m sorry but I’m new to Latin, you’re making this mistake when I try to view the page:`Trying to get Property 'name' of non-object This is my controller public function index(){ $medicos =…
-
0
votes1
answer107
viewsDoubt with foreign key
To register the matches of a football championship the following tables were defined: Time ( id int primary key, nome char(20), pontos int, nroVitorias, golsMarcados int, golsSofridos int ) Jogo (…
-
0
votes3
answers131
viewsHow to relate questions to a question
This question is not directly linked to code, but and the basic part of my project, I am currently divided into 2 options (which I will describe in detail below). Currently the UML is this way,…
-
0
votes1
answer76
viewsError while displaying Laravel Relationship data
Gentlemen, I am creating a relationship between 3 tables, the product that takes category values and sessions, but this always returning me the following error: Trying to get Property of non-object…
-
0
votes1
answer505
viewsHow can I list 3 tables using Laravel
Hello, I need some help with Relationships. I’m studying Laravel and I came across this problem. I could use Join, but wanted a simpler way and use Laravel’s relationships to do this kind of search.…
-
0
votes1
answer387
viewsProblems with table linkage in the Standard
When I type php artisan migrate it generates this error: Illuminate\Database\QueryException : SQLSTATE[HY000]: General error: 1005 Can't create table `blog`.`produtos` (errno: 150 "Foreign key…
-
0
votes0
answers56
viewsRelationship with Mongodb
I am using populate to create relationship with mongoDB, in case I have clients and projects, both belonging to the logged-in user, and being the project belonging to a client, my doubt is that to…
-
0
votes1
answer99
viewsLaravel - Query with 3 tables (1-N)
I’m trying to relate these tables: The goal is to show: Nome,Descrição,Parcela,Valor Model Cliente: class Cliente extends Model { public function recebtos() { return…
-
0
votes2
answers167
viewsEloquent: Relationship (JSON) -> Hasmany and Belongsto
Say guys all right? Next, I have a little problem related to two models within my project. First Model I have a relationship hasOne: <?php namespace App; use Illuminate\Database\Eloquent\Model;…
-
0
votes1
answer103
viewsCreate a Wordpress Query using ACF Relational Fields
good night. I’m developing a movie registration website for a movie-aficionado cousin and need a help to put a query that lists the names of the films whose page personality participated or acted. I…
-
0
votes1
answer990
viewsWhat is wrong in this Adonisjs relationship
I’m having the following mistake when I give Adonis Migration:run : { error: relation "polo" does not exist at Connection.parseE (C:\ckinfo\node_modules\pg\lib\connection.js:604:11) at…
-
0
votes1
answer650
viewsConsultation with eloquent relationship
I am hitting myself here with a simple query on Laravel, I want to make a query on the client table and bring the customer’s address together. Note: Whenever I try it brings the address id and not…
-
0
votes1
answer1043
viewsHow can I create a Many to Many relationship in Adonisjs?
Well, I created a Many to Many relationship, just as I saw in the documentation, some posts and some videos on the internet, I was not successful in any attempt by some mistake of mine that I can’t…
-
0
votes1
answer41
viewsEntity framework Client For Sale
I’m having doubts about how to build the relationship between the Client and Sale classes, taking a look at the microsoft website, I was left with doubt if the class should have the navigation for…
-
0
votes0
answers215
viewsRelate field to mysql table
I need to do a test crud for a company. In this test, I had to create the Name, Email, Phone and Address fields, and it should be possible to enter more than one address by name in this CRUD. I…
-
0
votes1
answer98
viewsDjango n:n relationship with grid call
Good night. I am creating a system in Python/Django where I have a relationship n:n between a table Person and another Process and for this I created a third entity called Procedural part. I’ve done…
-
0
votes1
answer86
viewsDoubt with belongsToMany Standard 7
I have a relationship N:N that’s giving me trouble in returning using the with() follows the example of my two models with problem and the way I call the query. Model product_type public function…
-
0
votes1
answer129
views(Sequelize) Cannot read Property 'title' of Undefined
Hello, I am developing a cart system for Ecommerce, and within the Model Cart, I have made a relationship with User Model and Product Model, so I can access the two items through the Cart. However,…
-
0
votes1
answer43
viewsI have a problem in the relation between two tables in Sqlite using python/Django
I am making a simple CRUD, using 2 tables, the default user of Django and the citizen I created, I am using a foreinkey username to link the two, but in the form, instead of appearing a username…
-
0
votes0
answers17
viewsJoin does not work on Objection.js
I’m using Objection.js to build my Models using Node Typescript. I have a projects table that can have a user, so I have a foreign_key id_usuario in the projects table. So far so good, but when I…
-
0
votes1
answer34
viewsHow to display data correctly in a datatable
I need some information about running two tables through the index. I have the following code in the controller: public function index(){ $tabela = capitulo::orderby('id', 'desc')->paginate();…