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
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 298
Joined: 2019-05-21 22:42
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 388 times
Olaf

onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 298
Joined: 2019-05-21 22:42
Contact:

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

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

Hi,

the problem also occurs, when I try to change (update) a record.

Olaf

onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 298
Joined: 2019-05-21 22:42
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

onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 298
Joined: 2019-05-21 22:42
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

onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 298
Joined: 2019-05-21 22:42
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: 1034
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: Learn all the tips and tricks of customizing AppGini apps through our online course.
:arrow: Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
:arrow: Summary Reports plugin: Build powerful reports and charts for your AppGini apps.
:arrow: Search Page Maker: Compose user-friendly yet powerful search pages for your AppGini apps.

onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 298
Joined: 2019-05-21 22:42
Contact:

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

Post by onoehring » 2019-06-23 05:04

Hi,

I sent the file.

Olaf

Post Reply