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;
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
add a comment
|
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
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
add a comment
|
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
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
symfony doctrine sonata
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
add a comment
|
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
add a comment
|
1 Answer
1
active
oldest
votes
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
add a comment
|
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
add a comment
|
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
add a comment
|
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
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
answered Apr 1 at 6:49
KevinKevin
598 bronze badges
598 bronze badges
add a comment
|
add a comment
|
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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