Doctrine not seeing changes to certain fields within entity for prod env but does on dev envDoctrine problematical on prod, but not devSymfony2 updated entity works on dev but not on prodSymfony2: One To Many Relationshipdoctrine:schema:update --force does not work is it APC?Doctrine does not see mapping on dev env but it does on test envDoctrine not tracking changes to some fields in entityPersist entity on non persisted field changeSet doctrine entity boolean field to 0 instead of nullDoctrine 2.5: Unrecognized field (but only in Symfony's prod mode)Symfony 4 + Sonata + Sonata Doctrine ORM Admin Bundle: Error: No Metadata classes to process

Are there objective criteria for classifying consonance v. dissonance?

Can I see Harvest moon in India?

Can a character with good/neutral alignment attune to a sentient magic item with evil alignment?

Can I travel to European countries with the Irish passport and without destination Visa?

Difference between system uptime and last boot time in windows

Is there a tool to measure the "maturity" of a code in Git?

Impossible Scrabble Words

Ethernet, Wifi and a little human psychology

Some Prime Peerage

Make 2019 with single digits

Meaning of Swimming their horses

Are there any rules about taking damage whilst holding your breath in combat?

Why don't Wizards use wrist straps to protect against disarming charms?

Can derivatives be defined as anti-integrals?

Exponentiation with parentheses

Why is the year in this ISO timestamp not 2019?

In what state are satellites left in when they are left in a graveyard orbit?

What is the mathematical notation for rounding a given number to the nearest integer?

How to publish superseding results without creating enemies

What is this gigantic dish at Ben Gurion airport?

Unable to find solution to 6 simultaneous equations

How does a linear operator act on a bra?

Make 1998 using the least possible digits 8

What's the benefit of prohibiting the use of techniques/language constructs that have not been taught?



Doctrine not seeing changes to certain fields within entity for prod env but does on dev env


Doctrine problematical on prod, but not devSymfony2 updated entity works on dev but not on prodSymfony2: One To Many Relationshipdoctrine:schema:update --force does not work is it APC?Doctrine does not see mapping on dev env but it does on test envDoctrine not tracking changes to some fields in entityPersist entity on non persisted field changeSet doctrine entity boolean field to 0 instead of nullDoctrine 2.5: Unrecognized field (but only in Symfony's prod mode)Symfony 4 + Sonata + Sonata Doctrine ORM Admin Bundle: Error: No Metadata classes to process






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I am running sonata admin and I have an existing working entity/admin. I've added another 2 columns to the doctrine orm, the entity, the admin and ran the app/console doctrine:schema:update commands to get the fields in to the database successfully.



On local dev environment, this works great.



On production, the new fields aren't saving.



When saving the entity within sonata admin if I manually call $this->isMyNewField() in preUpdate or postUpdate I get the correct result of true or false depending on whether i checked the box or not.



However doctrine doesn't seem to be correctly registering the field at all, i've logged the sql that it is running on update and persist and it literally doesn't even try and do anything with the field whatsoever on either.



If I change the AppKernel to run on 'dev' rather than 'prod' (on production environment) then all works as expected and doctrine picks it up without an issue.



Ive tried clearing doctrine metadata, clearing cache, restarting servers, changing field types, removing in doctrine and re-adding (via the entity orm xml file)



Still no luck. Any other ideas I can try?



Thanks



Kevin










share|improve this question


























  • clear cache or try to clear metadata

    – habibun
    Mar 31 at 3:03











  • I had tried that earlier, but it was correct, I'd missed the env parameter 😖

    – Kevin
    Apr 1 at 6:50

















0















I am running sonata admin and I have an existing working entity/admin. I've added another 2 columns to the doctrine orm, the entity, the admin and ran the app/console doctrine:schema:update commands to get the fields in to the database successfully.



On local dev environment, this works great.



On production, the new fields aren't saving.



When saving the entity within sonata admin if I manually call $this->isMyNewField() in preUpdate or postUpdate I get the correct result of true or false depending on whether i checked the box or not.



However doctrine doesn't seem to be correctly registering the field at all, i've logged the sql that it is running on update and persist and it literally doesn't even try and do anything with the field whatsoever on either.



If I change the AppKernel to run on 'dev' rather than 'prod' (on production environment) then all works as expected and doctrine picks it up without an issue.



Ive tried clearing doctrine metadata, clearing cache, restarting servers, changing field types, removing in doctrine and re-adding (via the entity orm xml file)



Still no luck. Any other ideas I can try?



Thanks



Kevin










share|improve this question


























  • clear cache or try to clear metadata

    – habibun
    Mar 31 at 3:03











  • I had tried that earlier, but it was correct, I'd missed the env parameter 😖

    – Kevin
    Apr 1 at 6:50













0












0








0








I am running sonata admin and I have an existing working entity/admin. I've added another 2 columns to the doctrine orm, the entity, the admin and ran the app/console doctrine:schema:update commands to get the fields in to the database successfully.



On local dev environment, this works great.



On production, the new fields aren't saving.



When saving the entity within sonata admin if I manually call $this->isMyNewField() in preUpdate or postUpdate I get the correct result of true or false depending on whether i checked the box or not.



However doctrine doesn't seem to be correctly registering the field at all, i've logged the sql that it is running on update and persist and it literally doesn't even try and do anything with the field whatsoever on either.



If I change the AppKernel to run on 'dev' rather than 'prod' (on production environment) then all works as expected and doctrine picks it up without an issue.



Ive tried clearing doctrine metadata, clearing cache, restarting servers, changing field types, removing in doctrine and re-adding (via the entity orm xml file)



Still no luck. Any other ideas I can try?



Thanks



Kevin










share|improve this question
















I am running sonata admin and I have an existing working entity/admin. I've added another 2 columns to the doctrine orm, the entity, the admin and ran the app/console doctrine:schema:update commands to get the fields in to the database successfully.



On local dev environment, this works great.



On production, the new fields aren't saving.



When saving the entity within sonata admin if I manually call $this->isMyNewField() in preUpdate or postUpdate I get the correct result of true or false depending on whether i checked the box or not.



However doctrine doesn't seem to be correctly registering the field at all, i've logged the sql that it is running on update and persist and it literally doesn't even try and do anything with the field whatsoever on either.



If I change the AppKernel to run on 'dev' rather than 'prod' (on production environment) then all works as expected and doctrine picks it up without an issue.



Ive tried clearing doctrine metadata, clearing cache, restarting servers, changing field types, removing in doctrine and re-adding (via the entity orm xml file)



Still no luck. Any other ideas I can try?



Thanks



Kevin







symfony doctrine sonata






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 12:28







Kevin

















asked Mar 28 at 12:15









KevinKevin

598 bronze badges




598 bronze badges















  • clear cache or try to clear metadata

    – habibun
    Mar 31 at 3:03











  • I had tried that earlier, but it was correct, I'd missed the env parameter 😖

    – Kevin
    Apr 1 at 6:50

















  • clear cache or try to clear metadata

    – habibun
    Mar 31 at 3:03











  • I had tried that earlier, but it was correct, I'd missed the env parameter 😖

    – Kevin
    Apr 1 at 6:50
















clear cache or try to clear metadata

– habibun
Mar 31 at 3:03





clear cache or try to clear metadata

– habibun
Mar 31 at 3:03













I had tried that earlier, but it was correct, I'd missed the env parameter 😖

– Kevin
Apr 1 at 6:50





I had tried that earlier, but it was correct, I'd missed the env parameter 😖

– Kevin
Apr 1 at 6:50












1 Answer
1






active

oldest

votes


















0
















Hi all turns out it was the command



app/console doctrine:cache:clear-metadata 


That needed running, I had tried this without success so the big thing I missed off it was the env so the command was



app/console doctrine:cache:clear-metadata --env=prod


Was fine after this, very frustrating






share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );














    draft saved

    draft discarded
















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55397397%2fdoctrine-not-seeing-changes-to-certain-fields-within-entity-for-prod-env-but-doe%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0
















    Hi all turns out it was the command



    app/console doctrine:cache:clear-metadata 


    That needed running, I had tried this without success so the big thing I missed off it was the env so the command was



    app/console doctrine:cache:clear-metadata --env=prod


    Was fine after this, very frustrating






    share|improve this answer





























      0
















      Hi all turns out it was the command



      app/console doctrine:cache:clear-metadata 


      That needed running, I had tried this without success so the big thing I missed off it was the env so the command was



      app/console doctrine:cache:clear-metadata --env=prod


      Was fine after this, very frustrating






      share|improve this answer



























        0














        0










        0









        Hi all turns out it was the command



        app/console doctrine:cache:clear-metadata 


        That needed running, I had tried this without success so the big thing I missed off it was the env so the command was



        app/console doctrine:cache:clear-metadata --env=prod


        Was fine after this, very frustrating






        share|improve this answer













        Hi all turns out it was the command



        app/console doctrine:cache:clear-metadata 


        That needed running, I had tried this without success so the big thing I missed off it was the env so the command was



        app/console doctrine:cache:clear-metadata --env=prod


        Was fine after this, very frustrating







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 1 at 6:49









        KevinKevin

        598 bronze badges




        598 bronze badges





















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.




















            draft saved

            draft discarded















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55397397%2fdoctrine-not-seeing-changes-to-certain-fields-within-entity-for-prod-env-but-doe%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해