database constraints and auto discovery of database relation

Auto discovery of database relations gives strange results.

Foreign Key constraints are interpreted by Servoy 2.1 as Cascading Delete constraints.
But with Servoy 2.1.1b1 they are interpreted as Foreign Key constraints but cascading delete constraints are not recognised as such.

So in short. ALL db relations are interpreted in 2.1 as Cascading Delete constraints.
And in 2.1.1b1 ALL db relations are interpreted as Foreign Key constraints.
In both cases this is wrong behaviour.

I know you can now change the db relations in 2.1.1(b1) but Servoy should recognise them correctly in the first place.
This bug in 2.1 is VERY damaging when you didn’t check your auto-created relations. You can lose a LOT of data this way.

Used backend database: PostgreSQL 7.4

ROCLASI:

  1. So in short. ALL db relations are interpreted in 2.1 as Cascading Delete constraints.
  2. And in 2.1.1b1 ALL db relations are interpreted as Foreign Key constraints.
    In both cases this is wrong behaviour.
  1. correct, that 's why we changed that behaviour
  2. what exactly do you mean?

jaleman:

ROCLASI:

  1. So in short. ALL db relations are interpreted in 2.1 as Cascading Delete constraints.
  2. And in 2.1.1b1 ALL db relations are interpreted as Foreign Key constraints.
    In both cases this is wrong behaviour.
  1. correct, that 's why we changed that behaviour
  2. what exactly do you mean?

It means that when you have a Cascading Delete constraint Servoy doesn’t mark it as such.
Shouldn’t Servoy have the ‘Delete Related Records’ checkbox checked in these instances?

ROCLASI:

jaleman:

ROCLASI:

  1. So in short. ALL db relations are interpreted in 2.1 as Cascading Delete constraints.
  2. And in 2.1.1b1 ALL db relations are interpreted as Foreign Key constraints.
    In both cases this is wrong behaviour.
  1. correct, that 's why we changed that behaviour
  2. what exactly do you mean?

It means that when you have a Cascading Delete constraint Servoy doesn’t mark it as such.
Shouldn’t Servoy have the ‘Delete Related Records’ checkbox checked in these instances?

That would be a bit double, the checkbox in Servoy means that Servoy will do the delete for you while if you have already defined that on the database side the database will already do those deletes. We are investigating on how we could display this in Servoy, perhaps a greyed out delete checkbox in Servoy is a good choice.