I'm working with the demo version and hit a problem with sql datasources.
The database describes IT assets. Each asset has an owner and a user. I have 3 tables:
1. People: primary key idPeople
2. Assets: primary key idAssets, foreign key People.idPeople points to the owner
3. Checkouts: primary key idCheckouts foreign key Assets.idAssets points to the asset and People.idPeople points to the user.
Note that table 2 and 3 both have foreign keys that point to the People table, and that for any given asset the keys have different values since the owner and the user don't have to be the same person.
I've set up my data sources with the proper fields and the foreign keys declared. Putting Checkouts or Assets into listgrids individually works fine. However when I try to include the user from Checkouts in Assets smartclient just duplicates the owner rather than retrieving the user.
I can easily write the proper join in SQL, but smartclient seems to get lost. Perhaps too much optimization?
Is there a way to tell smartclient to do less query optimization, or give it an explicit where clause to use?
Russ Poyner
The database describes IT assets. Each asset has an owner and a user. I have 3 tables:
1. People: primary key idPeople
2. Assets: primary key idAssets, foreign key People.idPeople points to the owner
3. Checkouts: primary key idCheckouts foreign key Assets.idAssets points to the asset and People.idPeople points to the user.
Note that table 2 and 3 both have foreign keys that point to the People table, and that for any given asset the keys have different values since the owner and the user don't have to be the same person.
I've set up my data sources with the proper fields and the foreign keys declared. Putting Checkouts or Assets into listgrids individually works fine. However when I try to include the user from Checkouts in Assets smartclient just duplicates the owner rather than retrieving the user.
I can easily write the proper join in SQL, but smartclient seems to get lost. Perhaps too much optimization?
Is there a way to tell smartclient to do less query optimization, or give it an explicit where clause to use?
Russ Poyner
Comment