DDC-230: Please, someone explain, because I do not have any idea why this is like this!!! #284

Closed
opened 2026-01-22 12:33:29 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Dec 27, 2009).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user thecelavi:

I am trying to create a Page. I send some params, pull out some objects from the DB with EM and set those objects according to Object Model to a page:

This is the code snippet:
$language = $this->DAO->getLanguage($id_language);

$page->setPageTitle($page_title);
$page->setMenuTitle($menu_title);
$page->setDescription($description);
$page->setKeywords(implode(",",array_map('trim', explode(",", $keywords))));
$page->setPageLayout($layout);
$page->setLanguage($language);
$page->setParentDirectory($parent_directory);
$page->setPosition($position);
// TODO report the bug to JIRA
$page->getLanguage()->getId();
// THIS IS A STRANGE BUG
if ($this->DAO->savePage(&$page))
etc....

Each page is in one language. I do not think that i should submit the all code, because, use case is quite simple - I set the page language, and if I do not do this:

   $page->getLanguage()->getId();

It inserts a NULL?!?!?!

Strange is, it does not do that on some other code that I have develop.

It is like EM does not realize that lang is part of his work, or something else quite strange.

Please, someone explain, and if necessary, I will upload rest of the code.

Originally created by @doctrinebot on GitHub (Dec 27, 2009). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user thecelavi: I am trying to create a Page. I send some params, pull out some objects from the DB with EM and set those objects according to Object Model to a page: This is the code snippet: $language = $this->DAO->getLanguage($id_language); $page->setPageTitle($page_title); $page->setMenuTitle($menu_title); $page->setDescription($description); $page->setKeywords(implode(",",array_map('trim', explode(",", $keywords)))); $page->setPageLayout($layout); $page->setLanguage($language); $page->setParentDirectory($parent_directory); $page->setPosition($position); // TODO report the bug to JIRA $page->getLanguage()->getId(); // THIS IS A STRANGE BUG if ($this->DAO->savePage(&$page)) etc.... Each page is in one language. I do not think that i should submit the all code, because, use case is quite simple - I set the page language, and if I do not do this: ``` $page->getLanguage()->getId(); ``` It inserts a NULL?!?!?! Strange is, it does not do that on some other code that I have develop. It is like EM does not realize that lang is part of his work, or something else quite strange. Please, someone explain, and if necessary, I will upload rest of the code.
admin added the Bug label 2026-01-22 12:33:29 +01:00
admin closed this issue 2026-01-22 12:33:30 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jan 19, 2010):

Comment created by romanb:

We need a testcase. Please make sure you've read http://www.doctrine-project.org/documentation/manual/2_0/en/association-mapping:owning-side-and-inverse-side carefully. In particular the part about changes that are only applied to the inverse side being ignored.

@doctrinebot commented on GitHub (Jan 19, 2010): Comment created by romanb: We need a testcase. Please make sure you've read http://www.doctrine-project.org/documentation/manual/2_0/en/association-mapping:owning-side-and-inverse-side carefully. In particular the part about changes that are only applied to the inverse side being ignored.
Author
Owner

@doctrinebot commented on GitHub (Feb 10, 2010):

Comment created by @beberlei:

Doesn't seem to be an issue anymore.

@doctrinebot commented on GitHub (Feb 10, 2010): Comment created by @beberlei: Doesn't seem to be an issue anymore.
Author
Owner

@doctrinebot commented on GitHub (Feb 10, 2010):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Feb 10, 2010): Issue was closed with resolution "Invalid"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#284