⚠ 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

set_relation issue



Kor
  • profile picture
  • Member

Posted 03 July 2013 - 15:04 PM

Greetings!

 

Hey Johnny, you're doing such a great work! This tool is simply awsome! :) I'm looking forward to get the new stable 1.4 version.

 

I'm building a new application, using the 1.4 beta from github. So far, it is working just fine. Of course, as a beta, there's some issues, like when you add a new record in the table, the new item doesn't appear in the grid, unless you refresh the all page. No big deal though, just an observation.

 

Now, the real issue: I understand that the set_relation function does a LEFT JOIN, since the records on master table are shown even they don't exist in the related table. However, I need to do a INNER JOIN relation in order do show only the records that exists on both tables. Is it that possible?

 

 

Thanks for listening! :)

 

Qapla'


Kor
  • profile picture
  • Member

Posted 03 July 2013 - 16:11 PM

And related to this subject, I'd like to ask how do I make an insert into two related tables at once?

 

Consider de following scenario:

 

Person

 

person_id

name

address... yadda, yadda....

 

Manufacturer

 

manufacturer_id

person_id

points

 

So, when I insert a new person, I want also to insert a new manufacturer in the same process and same form.


davidoster
  • profile picture
  • Member

Posted 04 July 2013 - 08:25 AM

I believe your best bet is by extending the library and either reprogramming the set_relation or building your own.

Check here: /topic/90-how-to-create-an-extension-for-grocery-crud-real-example-included/