⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

two columns in set_relation_n_n



Robson

Robson
  • profile picture
  • Member

Posted 05 October 2016 - 22:28 PM

Hi!

 

I need to get two columns of an n relation to n (set_relation_n_n), but it returns me only one column.
 

$crud->set_relation_n_n('Unidades', 'pessoa_unidade', 'unidade', 'pessoa_id', 'unidade_id', 'nome_unidade');
 
The only column that returns me is nome_unidade though, I wanted to unidade_id column that is in pessoa_unidade table to use it in a or_where clause
.
 
Does anyone know how to do this without having to create a specific model for this?

 

Thanks.