Running a "script" to add relations

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

Running a "script" to add relations

Postby birgit » Fri Sep 08, 2006 3:03 pm

I have a table persons and a table profile. Each person must have a profile, a profile may be used by 1 or many persons (1:n).

I my data modelling tool I define a constraint called "persons_must_have" between the primary key in persons and a foreign key in profiles.

Servoy creates a relation called persons_must_have_FK on table profile.

I'd like to have two relations:
1. persons_must_have on table persons
2. profiles_may_be_used on table profiles.

Servoy could create the first relation (unfortunately it does it vice versa). But it does not have enough information for the second relation. The relation name is missing. But I can get this information from my modelling tool. I could create a script like
Code: Select all
create relation x from persons to profiles using (pk1=fk1, pk2=fk2,...)
and
Code: Select all
create relation y from profiles to persons using (pk3=fk3, pk4=fk4,...)


It would be nice if I could run the script somewhere in servoy (against the repository?) to create relations automatically (without dialog).

Since I have around 70 constraints, I'll have to create around 140 relations by hand otherwise.

Any other ideas are very welcome. Best regards
Birgit
Birgit Rieder
7r gmbh, Switzerland
SAN Developer
User avatar
birgit
 
Posts: 302
Joined: Sun Jan 15, 2006 10:04 pm
Location: Switzerland

Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 15 guests

cron