Questions tagged as 'chave-estrangeira'

1
answer

Trying to get property 'name' of non-object Laravel Eloquent Error pulling foreign key data [duplicate]

I'm trying to use relationships to display data on the screen but I get the following error:    Trying to get property 'name' of non-object In this command $recebimento->planoconta()->get()->first()->nome MODEL ACCOUNT...
asked by 15.02.2018 / 14:28
0
answers

Duplicate values in column that is foreign key

When trying to insert a new data into a given table (official), I have a column named "managerID" which is FK of the "official" table itself. During the registration I send the ID of another employee in this column, only it is returning that...
asked by 28.01.2018 / 23:08
3
answers

Logic for foreign key usage - user notes

I'm stuck with a foreign key usage problem. I can not find the logic for a system: The problem: the user gives a note to each question, each one being a table field, and in the end the average is calculated and inserted into the database. How...
asked by 06.07.2017 / 19:11
0
answers

Table does not display name relative to Foreign Key PHP Table

I need to query the table and return the Date in the first column, Name (FK) in the second column, and other FK-dependent data in their respective columns . I've tried the various forms of INNER JOIN and I can not show the patient's name,...
asked by 27.04.2017 / 02:26
0
answers

Invalid value: For input string:

Error updating, the value of the field must be the FK code for the foreign key, in the INPUT of the form the value br.com.tkcsapcd.model.bean.ProjectInicio@7adacc20, value="$ { "Should something be modified?                                   ...
asked by 25.04.2017 / 23:12
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