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: 541
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 817 times
Olaf
Some postings I was involved, you might find useful:
Backup your database (viewtopic.php?f=4&t=3341); Improve security (viewtopic.php?f=4&t=3168); Field Permissions (viewtopic.php?f=4&t=3308); Custom (error) message (viewtopic.php?f=7&t=1740&p=10871#p10906); Audit Log (viewtopic.php?f=4&t=1369&p=10407); Two Factor Authentication (viewtopic.php?f=7&t=3306&p=11478); Add 2nd SAVE CHANGES button (viewtopic.php?f=2&t=3242&p=11104); Place a search on details view (viewtopic.php?f=2&t=3479&p=12484#p12484); Column-Value-Based-Permissions (viewtopic.php?f=4&t=3498)

onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 541
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
Some postings I was involved, you might find useful:
Backup your database (viewtopic.php?f=4&t=3341); Improve security (viewtopic.php?f=4&t=3168); Field Permissions (viewtopic.php?f=4&t=3308); Custom (error) message (viewtopic.php?f=7&t=1740&p=10871#p10906); Audit Log (viewtopic.php?f=4&t=1369&p=10407); Two Factor Authentication (viewtopic.php?f=7&t=3306&p=11478); Add 2nd SAVE CHANGES button (viewtopic.php?f=2&t=3242&p=11104); Place a search on details view (viewtopic.php?f=2&t=3479&p=12484#p12484); Column-Value-Based-Permissions (viewtopic.php?f=4&t=3498)

onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 541
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
Some postings I was involved, you might find useful:
Backup your database (viewtopic.php?f=4&t=3341); Improve security (viewtopic.php?f=4&t=3168); Field Permissions (viewtopic.php?f=4&t=3308); Custom (error) message (viewtopic.php?f=7&t=1740&p=10871#p10906); Audit Log (viewtopic.php?f=4&t=1369&p=10407); Two Factor Authentication (viewtopic.php?f=7&t=3306&p=11478); Add 2nd SAVE CHANGES button (viewtopic.php?f=2&t=3242&p=11104); Place a search on details view (viewtopic.php?f=2&t=3479&p=12484#p12484); Column-Value-Based-Permissions (viewtopic.php?f=4&t=3498)

onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 541
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
Some postings I was involved, you might find useful:
Backup your database (viewtopic.php?f=4&t=3341); Improve security (viewtopic.php?f=4&t=3168); Field Permissions (viewtopic.php?f=4&t=3308); Custom (error) message (viewtopic.php?f=7&t=1740&p=10871#p10906); Audit Log (viewtopic.php?f=4&t=1369&p=10407); Two Factor Authentication (viewtopic.php?f=7&t=3306&p=11478); Add 2nd SAVE CHANGES button (viewtopic.php?f=2&t=3242&p=11104); Place a search on details view (viewtopic.php?f=2&t=3479&p=12484#p12484); Column-Value-Based-Permissions (viewtopic.php?f=4&t=3498)

onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 541
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
Some postings I was involved, you might find useful:
Backup your database (viewtopic.php?f=4&t=3341); Improve security (viewtopic.php?f=4&t=3168); Field Permissions (viewtopic.php?f=4&t=3308); Custom (error) message (viewtopic.php?f=7&t=1740&p=10871#p10906); Audit Log (viewtopic.php?f=4&t=1369&p=10407); Two Factor Authentication (viewtopic.php?f=7&t=3306&p=11478); Add 2nd SAVE CHANGES button (viewtopic.php?f=2&t=3242&p=11104); Place a search on details view (viewtopic.php?f=2&t=3479&p=12484#p12484); Column-Value-Based-Permissions (viewtopic.php?f=4&t=3498)

User avatar
a.gneady
Site Admin
Posts: 1089
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: Calendar plugin: Organize your data into beautiful calendars. NEW
: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: 541
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
Some postings I was involved, you might find useful:
Backup your database (viewtopic.php?f=4&t=3341); Improve security (viewtopic.php?f=4&t=3168); Field Permissions (viewtopic.php?f=4&t=3308); Custom (error) message (viewtopic.php?f=7&t=1740&p=10871#p10906); Audit Log (viewtopic.php?f=4&t=1369&p=10407); Two Factor Authentication (viewtopic.php?f=7&t=3306&p=11478); Add 2nd SAVE CHANGES button (viewtopic.php?f=2&t=3242&p=11104); Place a search on details view (viewtopic.php?f=2&t=3479&p=12484#p12484); Column-Value-Based-Permissions (viewtopic.php?f=4&t=3498)

Post Reply