loadRecords(PK) syntax issue

I know you can load one record by passing the PK to loadRecords() but I can’t seem to make it work.
I tried controller.loadRecords(PK) and controller.loadRecords([PK]) but in both instances I get the following error:

Error loading primary key data, Query must start with 'SELECT'
 > java.lang.IllegalArgumentException: Query must start with 'SELECT'

Is this a bug or am I not using the correct syntax?

This is Servoy 5.0rc1.

is your pk a string?

Then it wont work.
Also we dont support an array like that at the moment you could make a case for this.

But what you can do is wrap the the pk first in a JSDataSet

jcompagner:
is your pk a string?

Correct.

jcompagner:
Then it wont work.
Also we dont support an array like that at the moment you could make a case for this.

Will do.

jcompagner:
But what you can do is wrap the the pk first in a JSDataSet

That’s what I eventually did.