#1 2011-01-03 13:19:18

WladiD
Member
From: Germany
Registered: 2010-10-27
Posts: 38

Problems with the new "many-to-many" implementation

Hi ab!

I was busy with other stuff in the past weeks and today I can further work on Lauge, so I upgraded to the new release 1.11. I noticed the changes on the pivot solution and was on the way to complete all related adjustments in my code...but then I run at an impasse.

I don't need an additional client/server approach, instead I work directly with an TSQLRestServerDB instance. Further I don't need (at least not in Lauge) any DB independence.

The new methods DestGetJoined/DestGetJoinedTable of TSQLRecordMany requires as client a TSQLRestClient while the older (for example) DestGet method goes the flexible way and accepty any descendants of TSQLRest. There I was able to pass my TSQLRestServerDB instance...

Of course I saw the reason, you use TSQLRestClient.ExecuteList...but weren't the same possible with TSQLRest.InternalListJSON?

Or is the usage of an TSQLRestClient descendant a must?

I hope not...

Offline

#2 2011-01-03 13:56:17

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,550
Website

Re: Problems with the new "many-to-many" implementation

You should use TSQLRestClientDB instead of TSQLRestServerDB instance.
There is no speed penalty, it's just a wrapper around a private hidden TSQLRestServerDB instance.

It was a need for "many to many" methods to have all methods available in TSQLRestClient.
The InternalListJSON() method only accept ONE class parameter, and we need TWO classes, for the join...

This is the correct way of using directly the framework, without any client/server approach.
And if, in the future, you need to upgrade your application to a client/server architecture, you'd have just to change the class type to another TSQLRestClient descendant, corresponding to the communication protocol used.

Offline

#3 2011-01-03 14:20:36

WladiD
Member
From: Germany
Registered: 2010-10-27
Posts: 38

Re: Problems with the new "many-to-many" implementation

Oh, ok, thank you for the clarification!

This are things, which I have to learn step by step wink I saw the ancestor TSQLRestClientURI of TSQLRestClientDB an have thought, that this is an additional client/server concept.

Thank you for the fast answer!

Offline

Board footer

Powered by FluxBB