⚠ 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

relation n-n zero problem [RESOLVED]



fabio bento
  • profile picture
  • Member

Posted 15 August 2012 - 02:52 AM

Hi,

I had a problem with this kind of relationship, and I am here to share and ask a question.

I have a table in a relation n-n just with two ids:
ID_X (INT)
ID_Y(INT)

When a tried to implement this in grocerycrud a had an error, because one of the id's was set as zero:
[color=#4F5155]INSERT INTO `table` (`ID_X`, `ID_Y`) VALUES (30, 0)[/color]

[color=#4F5155]After add the "priority" field in the table as described in the documentation ([/color]http://www.grocerycrud.com/examples/set_a_relation_n_n[color=#4F5155]), everything works fine. [/color]

How does grocerycrud work with this auxiliar field?

Thaks... :)