Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9274177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:17:37+00:00 2026-06-18T16:17:37+00:00

This snippet of code is driving me crazy. Suppose that entity on which I’ve

  • 0

This snippet of code is driving me crazy.

Suppose that entity on which I’ve done all this operation have all the members that I recall with getters (either on db that on class file; moreover, onto db, all values were inserted).

$this->logger->debug('INV ROOM RATES CAPACITY - $ROOM ID: '.$camera->getId());
$this->logger->debug('INV ROOM RATES CAPACITY - $ROOMCAPACITY: .$camera->getCapienza());
$this->logger->debug('INV ROOM RATES CAPACITY - CAMERA DB ID: '.$camera->getId());

This outputs the following

[2013-02-11 14:17:32] app.DEBUG: INV ROOM RATES CAPACITY - $ROOM ID: 14 [] []
[2013-02-11 14:17:32] app.DEBUG: INV ROOM RATES CAPACITY - $ROOMCAPACITY:  [] []
[2013-02-11 14:17:32] app.DEBUG: INV ROOM RATES CAPACITY - CAMERA DB ID:  [] []

It seems that ->getCapienza() method is messing all the things up (second getter on the same object, doesn’t return previous value).
Obviously, no error or exceptions are raised.

What’s going on here? Any ideas? I’m stuck since hours ….

EDIT

public function getCapienza()
{
    return $this->capienza;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T16:17:39+00:00Added an answer on June 18, 2026 at 4:17 pm

    Since you just told me that you are clearing the EntityManager sometimes, I digged into it a bit further.

    It is a known issue that will be fixed in Doctrine ORM 2.4 when https://github.com/doctrine/doctrine2/pull/406 is merged.

    The issue happens because of following piece of code: https://github.com/doctrine/doctrine2/blob/2.3.2/lib/Doctrine/ORM/UnitOfWork.php#L1724-L1780

    Basically, it is impossible to merge or generally use proxies that are detached from an EntityManager (you should have lazy-loaded them before).

    The problem you are experiencing is related with http://www.doctrine-project.org/jira/browse/DDC-1734

    A temporary solution is to re-fetch the data you want to use instead of recycling detached instances.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a snippet of code that looks something like this: data SomeData =
I have this snippet of code which is running with the success call of
I have this snippet of code, which fails at var link: var obj =
I have this snippet of code that completely screws up when I run it.
I have this snippet of code that should open a docx file and I
I have this snippet of code in which I want to handle the downlaod
I have this snippet of code that looks for the value in a select
I have this snippet of code which I simplified for the sake of this
I have this snippet of code: var ShopLogicOptions = {}; ShopLogicOptions.params = {orderId: '
I have this snippet of code private Templates retrieveFromCache(String name) { TemplatesWrapper t =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.