PDA

View Full Version : clientIdProperty!



westy
5 Jan 2012, 7:24 AM
Tracked down why some of my grids only have a single record in, but work fine with a page size of one, or by changing the sort order.

The product I am attempting to update to 4.1, and likely any product we will write in the future, is multi-tenanted (http://en.wikipedia.org/wiki/Multitenancy), a common thing with SaaS products I'd have thought. To determine which client data is for we use 'clientId'.

So, with 4.1 I suspect we're going to have to have a base model that changes this clientIdProperty to something obscure (phantomId perhaps?), for functionality that we don't use (we never create phantoms on the client).

Oh well, just thought would post about it in case anyone else has a similar issue.

Westy

westy
5 Jan 2012, 7:38 AM
Introducing a new base model class that changes clientIdProperty, and making all Ext.data.Model implementers inherit from that sorts the issue.

Would still argue that the id is not a client id though.

Cheers,
Westy

skirtle
5 Jan 2012, 9:38 PM
Nasty. I'd file this as a bug if I were you. Adding some magic significance to a field called clientId is just asking to collide with people's data.

westy
6 Jan 2012, 1:17 AM
So this won't get picked up unless I raise a bug, with a test case that demonstrates the obvious? :(

Was hoping the team working on 4.1 would be a little more involved in these forums really, as they were (at times) during the Ext 4 previews...

Thanks for the support though, I hoped I wasn't alone in thinking that using a field called 'clientId' for some magic client->server cruditude(!) was asking for trouble :))

Cheers,
Westy

skirtle
6 Jan 2012, 2:07 AM
You never know, your thread might get picked up by the devs. Some do, some don't. I was quite alarmed when I read your post and didn't want it slipping through the cracks.

I agree that it shouldn't be necessary to file a formal bug report to point out the obvious. Having a separate forum for the beta is a great idea but only if it's swarming with the dev team. If bugs still need reporting in the bugs forum it strikes me as an opportunity missed.

dongryphon
16 Mar 2012, 2:49 AM
This is issue EXTJSIV-5103 and is fixed post-RC1 (just now merged). The clientIdProperty will default to null.

:)

westy
16 Mar 2012, 6:15 AM
Excellent, thanks Don!