uasoft-indonesia / badaso

Laravel Vue headless CMS / admin panel / dashboard / builder / API CRUD generator, anything !
https://badaso.uatech.co.id
MIT License
1.21k stars 223 forks source link

version 2.x-dev does not solve issue #536 #622

Closed Dri372 closed 2 years ago

Dri372 commented 2 years ago

Hi @rahmatalmubarak I tested version 2.x-dev but bug is not solved, same symptom as #536

composer.lock ... "name": "uasoft-indonesia/badaso", "version": "2.x-dev", "source": { "type": "git", "url": "https://github.com/uasoft-indonesia/badaso.git", "reference": "036cf8e9c924d2ca328ef6471b1acd01c6037d9e" },

Originally posted by @Dri372 in https://github.com/uasoft-indonesia/badaso/issues/594#issuecomment-1066497464

rizkiheryandi commented 2 years ago

badaso not support int[] from postgres, so if you create a table directly on postgres with int[] or create the migration manually. So the PR #525 make badaso will show the popup that tell us the badaso not support it instead of error.

So we can change it first manually to int instead of int[]

you can also add a PR to make badaso support int[] datatype if you want too

thank you

Dri372 commented 2 years ago

@rizkiheryandi Thanks for your answer.

Communication is always a difficult art, especially since English is not our native language.

badaso not support int[] from postgres

Yes, understood and not a problem (for me).

So the PR https://github.com/uasoft-indonesia/badaso/pull/525 make badaso will show the popup that tell us the badaso not support it instead of error.

Ok with this solution, that I suggested in my original post.

I understood that your pull/525 was in the version "2.x-dev", either I misunderstood or I did a wrong test ... never mind it's not very important, I saw this error on existing application where I used such field for test only. So it's easy for me to change/delete the 'array types'. If you are confident with your pull/525, let's go ahead, close this thread, i'll wait for the ext version of the package.

Have a good day.

rizkiheryandi commented 2 years ago

youre welcome @Dri372 , have a good day too :)

Dri372 commented 2 years ago

For further information, this pb can be solved by modifying this file : vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php


        ◦ $this->doctrineTypeMapping = [
           ….
            'int4'          => 'integer',
            '_int4'          => 'integer',  # <-------------
            ….
            'text'          => 'text',
            '_text'          => 'text',     # <-------------
``
From the doc ( https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html#types ) this can be changed with the function AbstractPlatform::registerDoctrineTypeMapping($dbType, $doctrineType)

I don't know where to call this function in the Badaso code.