Questions tagged as 'relacionamento'

1
answer

Insert Many To Many Laravel 5.4

I have a situation as follows. I have 4 tables users - > department - > category_department - > category - > postings Where in my view I have a select where it shows a data relation about ex department: Thisinformationalreadycome...
asked by 12.09.2017 / 01:12
1
answer

Relationships Laravel OneToOne? [duplicate]

I am doing some exercises, but there is one where I can not understand why it is not working when I make another name in the method. I have a method in Model Location , where it does relationships of OneToOne . When I cal...
asked by 16.08.2017 / 21:29
2
answers

how to save objects in django with quantity validation?

I'm still a beginner on Django and would like to know how I would save a certain amount of students on jobs. Example: vagas = 5 , how do I allow only 5 students to be saved? class Turma(models.Model): descricao = model...
asked by 22.11.2016 / 13:55
1
answer

Laravel Update With Relationships - Good practice

I created an Update for a Products table that is related to another table that is the Product (product_info) for this product. But when I do Update I change the Product information, I delete the article and re-create an article with the same or...
asked by 14.10.2016 / 19:06
2
answers

Treating Many-to-Many Query

I got into a doubt about Many-to-Many relationships and I hope I'm not asking a repeat question, but I did not find the solution to my question in the least. It turns out that I have an image table, a job table, and a relationship table that...
asked by 23.06.2016 / 05:16
1
answer

JPA - Two OneToOne and OneToMany relationships between the same class

I have a Student class and it has two relationships with Pessoa a OneToOne and OneToMany and person in turn a relationship with Endereco , as shown below: Student Class @Entity @Table(name = "ESTUDANTE") public cla...
asked by 29.04.2015 / 13:27
1
answer

Using strong attributes with rails 4 and has_one relationship

I have a has_one relationship similar to yours where a :person has a :address . It turns out that the relationship is generated but the street that I put in input :street (address attribute) is not saved. I already...
asked by 20.01.2015 / 11:56
1
answer

Rails CanCanCan - Questions about Roles table

Good afternoon, I have the following models: User.rb class User < ApplicationRecord # Include default devise modules. Others available are: # :confirmable, :lockable, :timeoutable and :omniauthable devise :database_authenticatable,...
asked by 18.05.2018 / 20:41
1
answer

MySQL - Create field to insert more than one value coming from another table

Next, it may seem like a basic question but I need to know, I'm going straight to the point: I have a Players registry and a game registry (tables), referenced normally. I need to know how do I enable a player to select more than one game of...
asked by 23.01.2018 / 00:52
1
answer

How to Create a Table N: N Where One of the Keys Does Not Belong to a Table of the Same Database

Context: The application has a module for logging of calls and we use another application to deal with the record of incidents, both are in different databases. Each care may be related to one or more incidents and an incident may be rel...
asked by 30.12.2017 / 16:38