Relations not on primary keys

Hi

I cannot define a relation which is not based on the primary key. Do I miss something?

My workaround: I define the relation by defining the related attributes for the pk attributes. I save the relation and open it with the text editor. In there I delete all attributes which I do not need for the relation.

Regards
Birgit

What you mean “you can’t”? You cannot select a field other than the PK or you cannot save? Looks pretty weird… Servoy version?

I cannot save the relation - I get an error - if I do not define related attributes for all of the pk attributes. But sometimes the relation must be defined between other atttributes than pk attributes or just out of one pk attribute. What do I do wrong? Or is a Servoy relation limited to (at least) include the pk?

I’m using Servoy 4.1

Regards
Birgit

Can you post a screenshot of how you set up the relation?

And also the error code and text would be helpful.

I know there have been issues like this with relationships in - at least one of - the pre-releases of 4.1.
We are working with relationships in 4.1 almost everyday, but the problems do not sound familiar.

Just to be sure: are you working with 4.1 final?

Hi

Attached is a screenshot of the error.

Please, can anybody confirm that relations can be saved which do not cover all pk attributes? If this is the case, I make something wrong.

Thanks and regards
Birgit

Hi Birgit,

The screenshot suggests that the school_year column doesn’t have a column on the right-side of the relationship and is therefore not complete.
Or are you saying that you put a column name in there and when you want to save it it disappears ?

I cannot delete the attribute name on the left side (pk) and I do not want to fill it on the right side. My goal is to delete the whole line. But I cannot.

Why can’t you delete the entry on the left side?

That seems to be the source of your problem here.

Paul

Yes, why can I not delete the attribute? Did you try to? How do you delete it? Please try to define a relation with less attributes than pk attributes.

Ahh, I see what you mean. Eclipse wants you to really click on some text, instead of anywhere in a row. Well an empty line doesn’t have any text to click on, right ?
What does work however is to click in the field and use the arrow keys (up) to select the empty row.
Maybe Servoy should add a clear button or something.

Hope this helps.

On which environment and on which version are you experiencing this?

I’m on 4.1 on windows and I do see a bit tricky behavior (you have to doubleclick the empty entry at the top of the dropdown) but it does select the emtpy value then and mark the editor as having a change which I need to save.

Do you see the same?

If you cannot get it to accept the empty value in any way, can you please file a case for this in our support system, stating the platform and Servoy version?

Tnx,

Paul

For the record.
I see it on Mac OS X 10.5 with Java 5, Servoy 4.1.0 - build 651

I can’t double click the entry, one click wil close the menu. Using the arrow keys seem the only way (when the field has the focus).

Ahhhhh! The arrow key solved it! Finally I can select the empty line.

Mac OS X 10.4
Servoy 4.1.0 - build 651
Java 5

Thanks for the patience and regards
Birgit

PS: I agree: A better user interface would be appreciated.

This is a mac bug ( you can actually select the empty line but the region where you must click is very small). A clear button has been added in the table for better ui( available with next release).