×
This forum has been locked. Please submit new Feature Requests on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
Key field different than "Id"
sergio anachoreta
Yeni Üye
Posts: 2
10 yıl 2 ay önce #368
Yazan: sergio anachoreta
Key field different than "Id", sergio anachoreta tarafından oluşturuldu
Hi.everybody.
When I create a table, many fields are automatically created, including the "id" as a key field, auto increment. If I change this name to"product_id" for example and then generate the component, the table is created with a "id" as key field and "product_id" as a simple field.
Is it possible to create a table with a key field named different than "id", just like "product_id"?
Thanks
When I create a table, many fields are automatically created, including the "id" as a key field, auto increment. If I change this name to"product_id" for example and then generate the component, the table is created with a "id" as key field and "product_id" as a simple field.
Is it possible to create a table with a key field named different than "id", just like "product_id"?
Thanks
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Omar Ramos
Yeni Üye
Posts: 2
10 yıl 1 ay önce #416
Yazan: Omar Ramos
Omar Ramos tarafından Key field different than "Id" konusunda yanıtlandı
I tried the same thing as well and ran into the same issue...this would be a nice feature to have.
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Andres Maeso
Platin Üye
Posts: 338
10 yıl 1 ay önce #418
Yazan: Andres Maeso
Andrés Maeso
Customer relations manager at Joomla Component Creator.
Bu e-Posta adresi istenmeyen posta engelleyicileri tarafından korunuyor. Görüntülemek için JavaScript etkinleştirilmelidir.
Andres Maeso tarafından Key field different than "Id" konusunda yanıtlandı
Hello both!
I would move this to Feature Requests but I am afraid this request doesn't follow Joomla standards, so we won't be able to implement it.
Regards,
Andrés.
I would move this to Feature Requests but I am afraid this request doesn't follow Joomla standards, so we won't be able to implement it.
Regards,
Andrés.
Andrés Maeso
Customer relations manager at Joomla Component Creator.
Bu e-Posta adresi istenmeyen posta engelleyicileri tarafından korunuyor. Görüntülemek için JavaScript etkinleştirilmelidir.
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Omar Ramos
Yeni Üye
Posts: 2
10 yıl 1 ay önce #419
Yazan: Omar Ramos
Omar Ramos tarafından Key field different than "Id" konusunda yanıtlandı
Hi Andres,
It has definitely been a while since I wrote a component from scratch, but I'm pretty sure the Joomla conventions were flexible enough to accept a primary key field other than "ID", but I'll need to confirm as we continue our testing on our end.
The convention of adding the singular version of the table name as a prefix usually shows up in other databases I think (more commonly anyway), but currently the Nooku Framework uses it as well (but it uses more strongly as an actual convention for their framework).
I think the main thing, is as a user if it's not supported to modify the field name, maybe the ID field should not be allowed to be edited (so as to prevent confusion...because after I edited mine I didn't find out it wouldn't work until I buillt the component and attempted to install it and saw the SQL errors)?
It has definitely been a while since I wrote a component from scratch, but I'm pretty sure the Joomla conventions were flexible enough to accept a primary key field other than "ID", but I'll need to confirm as we continue our testing on our end.
The convention of adding the singular version of the table name as a prefix usually shows up in other databases I think (more commonly anyway), but currently the Nooku Framework uses it as well (but it uses more strongly as an actual convention for their framework).
I think the main thing, is as a user if it's not supported to modify the field name, maybe the ID field should not be allowed to be edited (so as to prevent confusion...because after I edited mine I didn't find out it wouldn't work until I buillt the component and attempted to install it and saw the SQL errors)?
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
sergio anachoreta
Yeni Üye
Posts: 2
10 yıl 1 ay önce #428
Yazan: sergio anachoreta
sergio anachoreta tarafından Key field different than "Id" konusunda yanıtlandı
Hi Andres.
As I said before, there are many extensions using key fields rather than Id, in particular ecommerce like Virtuemart , Joomshopping and others.
If your tool allow me to use other fieldname, certainly you will increase the power of the component creator.
As I said before, there are many extensions using key fields rather than Id, in particular ecommerce like Virtuemart , Joomshopping and others.
If your tool allow me to use other fieldname, certainly you will increase the power of the component creator.
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Andres Maeso
Platin Üye
Posts: 338
10 yıl 1 ay önce #438
Yazan: Andres Maeso
Andrés Maeso
Customer relations manager at Joomla Component Creator.
Bu e-Posta adresi istenmeyen posta engelleyicileri tarafından korunuyor. Görüntülemek için JavaScript etkinleştirilmelidir.
Andres Maeso tarafından Key field different than "Id" konusunda yanıtlandı
Hi there!
Ok, I'll move it to feature requests if it's ok with you. I've also asked people via twitter in case anybody feels it's interesting too.
Thanks for your feedback!
Ok, I'll move it to feature requests if it's ok with you. I've also asked people via twitter in case anybody feels it's interesting too.
Thanks for your feedback!
Andrés Maeso
Customer relations manager at Joomla Component Creator.
Bu e-Posta adresi istenmeyen posta engelleyicileri tarafından korunuyor. Görüntülemek için JavaScript etkinleştirilmelidir.
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Sayfa oluşturma süresi: 0.059 saniye