Questions tagged as 'relacionamento'

1
answer

How to create a new associated template in rails

Assuming I have the Admin user, Admin has login_user , as system_user , this relation is polymorphic, since other types of users also have login_user . When creating the Admin form, I should add the fields of login_us...
asked by 21.01.2015 / 00:38
1
answer

More than one relationship in the same model

My client class has a one-to-one relationship with endereco and one-to-many with contacts. How would the functions be in Cliente to work? and Migrate ?     
asked by 30.09.2014 / 13:44
1
answer

Relationship of tables using FK's [closed]

I'm making a system for the user to create an account and select the movies they've watched. I have a table in MySQL movies to register all the movies on the site and a table generos that is only the genres of movies (action, adventure ...) a...
asked by 03.09.2015 / 04:19
2
answers

Insert Image into a table already created

I have two tables - alunos(id, nome, email...) and fotos(id, imagem, id_aluno) . I need to add an image to each student already created. I had idea to make a select that appears all the students and then, selecting, to add...
asked by 26.04.2016 / 21:25