Bug? 5.75: Does AG assume PK is always integer?

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Bug? 5.75: Does AG assume PK is always integer?

Post by onoehring » 2019-06-12 18:13

Hi,

I have setup a field as VarChar and PK in AppGini. The Rebuild Fields does not show any problems in the Admin-Area. But: When I try to add a record this error shows up (but the record is added to the table).
ec16.png
ec16.png (84.03 KiB) Viewed 2483 times
Olaf


User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Bug? 5.75: Does AG assume PK is always integer?

Post by onoehring » 2019-06-12 18:34

Hi again,

when I try to delete a record (here with PK = yy ) also the error occurs ... which is strange, as the record should have been deleted already.

Code: Select all

Query:
SELECT * FROM ecomo_Lagerorte WHERE `ecomo_Lagerorte`.`ID_Lagerort_Kurz` = yy
This time, the record is not deleted.

Olaf

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: serious Bug! 5.75: AG assumes PK is always integer!

Post by onoehring » 2019-06-12 18:46

Hi,
me again. The problem occurs on other tables as well making it impossible to use a non numeric field as primary key.

Please fix in the next version. .... This is some important bug I think.

Why do I want other fields than numeric as PK? At this time AG makes it quite hard to show additional information in a record. One has to create extra fields in the foreign table and use autofill lookup - which is also not very neat when you need a value from a third table in the select. It needs serious workarounds. So my solution is, make my text fields PK (works in my scenario) and I add a integer field which I populate with the "_before_insert" hook with the max number of that field +1 ... effectively creating my own numeric pk.

Olaf

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Bug? 5.75: Does AG assume PK is always integer?

Post by onoehring » 2019-06-13 09:35

Hi,

once again to this bug.
The bug occurs and makes hooks set in the _after_insert break... this function is not executed anymore.

Olaf

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: Bug? 5.75: Does AG assume PK is always integer?

Post by a.gneady » 2019-06-22 16:02

Hmm ... AppGini doesn't assume that PK is always an integer ... You could try checking the Customers table from the online demo at https://bigprof.com/demo, where the primary key field is a VARCHAR and it's working fine. Is it possible to send me the AXP project file where this issue occurs please? You could use the support form at https://bigprof.com/appgini/support-request
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.


Post Reply