× 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"

9 años 7 meses antes #368 por sergio anachoreta
Key field different than "Id" Publicado por sergio anachoreta
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 

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

9 años 6 meses antes #416 por Omar Ramos
Respuesta de Omar Ramos sobre el tema Key field different than "Id"
I tried the same thing as well and ran into the same issue...this would be a nice feature to have.

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

9 años 6 meses antes #419 por Omar Ramos
Respuesta de Omar Ramos sobre el tema Key field different than "Id"
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)?

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

9 años 6 meses antes #428 por sergio anachoreta
Respuesta de sergio anachoreta sobre el tema Key field different than "Id"
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.

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Tiempo de carga de la página: 0.131 segundos
Gracias a Foro Kunena

Utilizamos cookies propias y de terceros para mejorar nuestros servicios y mostrarle publicidad relacionada con sus preferencias mediante el análisis de sus hábitos de navegación. Si continua navegando, consideramos que acepta su uso.