N-N Relations bug

I think there are a number of bugs in the N-N Relations wizard.

For the table that is being updated (“Link table”), if you have additional fields other than the primary key and the foreign key (e.g. in the example outlined in your documentation “profile” CHAR(5)), then when you specify the attributes of such additional fields (“Link Attributes” step of the wizard) then the Scriptcase attributes return incorrect values.
If you specify a field value, it works fine.

I tested some of the Scriptcase attributes and these are the database values it returned:

Attribute: Value:
Null ->@nm@null
Calculated by database if empty ->@nm@db_calc_if_emp

If you leave the link attribute selection of a field blank, you get a code generation error:
Link Table table / fields missing:software.
(“software”)

WORKAROUND
Define the attribute of additional fields (that you don’t want to be updated) at the “Relationship keys” stage of the wizard as AutoIncrement. It’s a shame that Null doesn’t work though! This is used in the Samples example on the web site, but what then is the purpose of the Scriptcase attributes??

Re: N-N Relations bug

UPDATE: Bug pending a fix…

Welcome to Netmake Support

Dear Andy,

I checked in our sector development, the issue which displays the result “null -> null @ @ nm”
it is a small footprint that is missing in scriptcase.

But this problem has just been reported and will be corrected in the next releases.

Re: N-N Relations bug

Not updated in v6.0.025
:frowning:

Re: N-N Relations bug

As of v6.0.030
still not updated…

Any idea when this might get a look in?

Re: N-N Relations bug

Hello andy,

I reported this issue a few weeks ago to our bugs team. I will ask them the current status of the bug.

regards,
Bernhard Bernsmann

I have now this bug (with version 7.00.0017), came alive again?

09-07-2013 09-56-14.jpg

I have a similar problem with SC7 (even with 7.0.0017) that I’ve reported to Netmake without notice, but I’ve found this problem when compiling.
My problem is that the relation table has four more fields plus the two relation fields. The solution here was set in ‘Link attributes’ all none N-N relation fields a defined value, in my case ‘null’. With this now works for me.

Hello,

Issue reported to our bugs team.

regards,
Bernhard Bernsmann

Hello,
The bug was solved?
I have two tables. Activities (id_act, name, duration) and Activities_user (id_act, id_user, duration). Ex: the activity may be 10 hours, but each user can be assigned up to 10 hours, depending on the hours that users participate in the activity. The setup wizard N-N relations requires to specify the attributes of such additional fields (“Link Attributes”, ex: duration) and this forced me to assign duration field of Activities table. The duration on Activities_user table is variable, and it is assigned by default value of duration field from Activities table when it is inserted. I have a grid to customize the duration to each user. But I have a problem, when I want to update the activity (ex: change the name), the relation NN updates all rows of Activities_user table, including additional fields (field duration) when it was customized to each user.

I have configured to show the N-N relation only in insert mode and not in update mode. In update mode displays the editable grid.

Any idea? What is the purpose of Scriptcase to force assign additional fields? Is it possible to avoid that the additional fields to be updated?

image001.png

Hello Cretic,

Which SC build are you working with?

Please open a new thread regarding your problem.

regards,
Bernhard

The fields missing bug is still alive and kicking…