Questions tagged as 'relacionamento'

1
answer

Create a Table-Relationship (N: N) that relates to a Table-Normal and another Table-Relationship (N: N) in SQL Server 2014 Management Studio

I'm trying to create this SQL Server Data Script, but when I run the following error message occurs:    Msg 1776, Level 16, State 0, Line 161 There are no primary keys or   candidates in the reference table 'tblSupplierInsumo' which   corresp...
asked by 20.01.2018 / 23:40
1
answer

Relationship 1: 1

I am having problems in the relationship of my products and stock tables. The stock table is responsible for storing the quantity of each item in the products table and the date when the product came in stock. Each item in the products table c...
asked by 08.05.2017 / 18:49
1
answer

Problem Laravel 5.2 non-object in foreach

I'm trying to pull the information out of this relationship as you can see below: Template: public function endereco(){ return $this->belongsTo('App\Models\End\Logradouro_Bairro'); } public function local(){ return $this->has...
asked by 06.01.2017 / 12:16
1
answer

AutoMapper Relationship One to Many - Model to ViewModel (and vice versa)

MVC scenario, where Controller talks to Application that talks to Domain. I'm trying to do a one-to-many mapping with AutoMapper. This is my Model: public class Estado { public Guid EstadoId { get; set; } public string Nome { get...
asked by 29.01.2017 / 18:10
1
answer

Hibernate inserts optimization when there is relationship @ManyToMany

Imagine relationships:    User has many Permissions       Permission has many Users We can create a N para N relationship as follows: User.class public class User { /*Many attributes here*/ private List permissions;...
asked by 18.01.2017 / 04:28
1
answer

Database table relationship [closed]

I have a registration form where it contains personal, professional, additional, financial and production information, my doubt, as it gives many columns, I believe more than 50 fields. Is it advisable to leave everything on a table? Or separ...
asked by 10.08.2016 / 03:00
1
answer

Auto Relationship

I have a drug chart. In it I have: Drug code (PK) description ans code There is the possibility of having more than one drug code for the same ans code. I need to make an appointment to bring all medications that have the same a...
asked by 28.06.2016 / 14:31
2
answers

Save Related Models (One to One) - Laravel 5.1

I have a Model Info and a Model Complement that are listed one by one. The relationships are already working properly, I can pull the data and such, but I need to do an update and I do not know how. Currently I get all the data in r...
asked by 14.04.2016 / 16:01
1
answer

Foreign keys in database modeling

Can a primary key have two foreign keys in different tables? For example:     
asked by 01.07.2015 / 08:54
1
answer

Doubt with foreign key

To register the games of a football league the following tables have been defined: Time ( id int primary key, nome char(20), pontos int, nroVitorias, golsMarcados int, golsSofridos int ) Jogo ( idTime1 int,...
asked by 30.11.2018 / 19:48