User tests: Successful: Unsuccessful:
Pull Request for Issue # .
Creation of an identifier field property in order to define the table field that store the identifier.
In order to create a plugin to components that have identifier field in table other than id.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Title |
|
Title |
|
Category | ⇒ | Search |
I am tempted to close this. It is solving a problem that shouldnt exist as you should have an id
@chrisdavenport thoughts
With this patch, it would be consistent with JTable which has API methods to allow you to define a primary key other than an id
column. Also note the core database schema does not always use id
as the primary key; the #__extensions
table uses a extension_id
primary key.
I've come across this problem before, but I've always been able to solve it by renaming the column. Others may not be so fortunate. So I think it makes sense and we should accept it once we have the usual 2+ independent tests.
I have tested this item
Created test table with pk
as primary key. Created smart search plugin to index the table. Indexing went correct if $item->id = $item->pk
and incorrect if $item->id
was not set. After clearing and applying patch, modified the identifier_field but items not indexed.
I think the change isn't thorough enough, in functions like categoryStateChange
, where all the children are modified, it should also account for the new field.
My PR should work, can you send me your smart seach plugin to see what goes wrong?
And you are right, in the categoryStateChange should consider this field as well. I will try to correct that.
@miguelbgouveia http://paste.ofcode.org/iRz7rxGMESsH2MP2z9xDAU at the bottom i added the sql from the table i used.
@miguelbgouveia is there something new to test?
Unfortunately I am not more working with the joomla CMS and and I have no time to verify and correct the problem in the present. Maybe in future I can attend this issue.
This PR needs a new owner or it will have to be closed as abandoned.
Category | Search | ⇒ | Administration com_finder Search |
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-08-20 12:05:37 |
Closed_By | ⇒ | brianteeman |
I was creating an smart search plugin for a specific component.
The problem is that component use a table where the identifier field don't have the 'id' name.
To resolve the problem it will be good if I could specified the field identifier name in cases that the name is other than 'id'.