Questions tagged as 'relacionamento'

1
answer

Relationship JPA, Spring, Angular,

I have a customer registration and I want to associate this customer with an equipment relationship but it is not saving the relationship. In the model layer of the client class I did so @OneToMany(cascade = {CascadeType.ALL } ) @JoinC...
asked by 31.08.2017 / 17:00
1
answer

Help with Relationship between 3 Tables #Rail

I would like your help with this issue below I have 3 Tables: Product Purshase Supplier supplier_id product_id name class Purshase < ActiveRecord::Base belongs_to :product end class Product < ActiveR...
asked by 26.05.2017 / 20:27
2
answers

Can I get the value of an autoincrement column before it is saved in the database?

I have three tables: preco , estabelecimento and precoXestabelecimento . The id of price is autoincrement and there is a N: N relationship between the first two tables, which is represented by the third precoX...
asked by 24.11.2016 / 14:31
1
answer

Remove relationship in return json from Laravel's Datatables package

I have the following code snippet using laravel and the Datatables package $products = Product::with('enterprise') ->select(['id', 'enterprise_id', 'name']) ->whereIn('enterprise_id', [1, 2]); retur...
asked by 26.08.2016 / 17:29
2
answers

Create bidirectional relationship without using DTO?

Hello, I'm in 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 using DTO? @Entity public class An...
asked by 01.07.2016 / 16:53
1
answer

Filtering and counting related model data

Company hasMany SectorCompany SectorCompany belongsTo Company SectorCompany hasMany Employee Officer belongsTo SectorCompany With this data in hand, how do I count how many officials with id_status = 1 a...
asked by 09.05.2016 / 19:10
1
answer

How to select all the tables that contain the field with the same name?

I need to look up all the "id_category" fields in a particular database, and bring up a list of tables that contain this field in common, which in this case is the foreign key of the "sis_category" table.     
asked by 08.04.2016 / 21:36
0
answers

Using ForeignKey to save in BD Django

I can not do the Data relation with Professor, I have to save Professor and pass his id to Foreign key Data and save, when I execute the code the id is not passed forms.py class ProfessorForm(forms.ModelForm): def __init__(self, *args...
asked by 18.05.2016 / 16:57
0
answers

PHP: TXT for multi-level Array

Well, yesterday I had asked for help on the subject here that friends soon helped me, but I came up against another problem: Then I realized that the .TXT file has several levels, not just 2 as I had observed yesterday. I tried every way to...
asked by 11.03.2016 / 02:51
1
answer

How to work with 1 to 1 relationship in core data?

How do I perform operations relating entities in Core Data?  These operations will relate data between 2 entities, being type 1 to 1. I want to relate the image attribute of table 1 to the image path field of table 2. Example: Iwouldliketo...
asked by 28.01.2015 / 16:29