N-N Relations error

Hello

once I set up a N-N Relations in a form I get the following error

Invalid argument supplied for foreach() | Script: C:\Program Files (x86)\NetMake\v81\wwwroot\scriptcase\devel\class\generator
mFontePHP.class.php linha: 21581

it seems that error stops the application from getting the data from the relationship table as when I run the application I can see the options but nothing selected even though when in the database they are.

any ideas to solve this issue?