[DDC-3315] [GH-1140] [DDC-2704] merge throughout entity hierarchy Created: 19/Sep/14  Updated: 19/Sep/14

Status: Open
Project: Doctrine 2 - ORM
Component/s: None
Affects Version/s: None
Fix Version/s: None
Security Level: All

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of tiger-seo:

Url: https://github.com/doctrine/doctrine2/pull/1140

Message:






[DDC-3314] Error with AttributeOverride when upgrading schema Created: 19/Sep/14  Updated: 19/Sep/14

Status: Open
Project: Doctrine 2 - ORM
Component/s: None
Affects Version/s: None
Fix Version/s: None
Security Level: All

Type: Bug Priority: Major
Reporter: JB Blanchon Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 1
Labels: orm


 Description   

I want to override an attribute from FOSuserBundle:User class with annotations.

My class extends BaseUser

SiteCustomer.php
class SiteCustomer extends BaseUser

My use statement is like this

SiteCustomer.php
use FOS\UserBundle\Model\User as BaseUser;

When I put the annotations on my entity

SiteCustomer.php
 /*
 * @ORM\AttributeOverrides({
 *     @ORM\AttributeOverride(name="emailCanonical",
 *         column=@ORM\Column(
 *             name="email_canonical",
 *             type="string",
 *             length=255,
 *             unique=false
 *         )
 *     )
 * })
 */

I get this error message :


MappingException: Invalid field override named 'emailCanonical' for class SiteCustomer.

I got the same error message, for usernameCanonical.
I need to override this field in order to remove the uniqness of the field
I use Doctrine v2.4.4 what is wrong with my annotation ? Why do I get this error when trying to upgrade my schema

Thank you






[DDC-3313] [GH-1139] Single entity flush Created: 18/Sep/14  Updated: 18/Sep/14

Status: Open
Project: Doctrine 2 - ORM
Component/s: None
Affects Version/s: None
Fix Version/s: None
Security Level: All

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of goetas:

Url: https://github.com/doctrine/doctrine2/pull/1139

Message:

The current `flush` behavior seems to be inconsistent or not well documented.






[DDC-3312] Cascade persist on non-owing side of a relation Created: 18/Sep/14  Updated: 18/Sep/14  Resolved: 18/Sep/14

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: None
Fix Version/s: None
Security Level: All

Type: Bug Priority: Major
Reporter: Asmir Mustafic Assignee: Benjamin Eberlei
Resolution: Duplicate Votes: 0
Labels: info


 Description   

Hi!
I have a strange behavior/question...

Looking to this test: https://github.com/doctrine/doctrine2/blob/master/tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php#L1152

in my opinion, it may be not correct.

CmsAddress is on non-owing side of CmsUser (https://github.com/doctrine/doctrine2/blob/master/tests/Doctrine/Tests/Models/CMS/CmsUser.php#L151).

$address has the cascade persist property.

Looking at the documentation (http://doctrine-orm.readthedocs.org/en/latest/reference/unitofwork-associations.html#important-concepts) seems that changes on non-owing side of a relation are always ignored, but the testFlushAndCascadePersist supposes that persit call has to be propagate to all associations.

Where I'm wrong?

Is persist propagated to all owing and non-owing associations?

BTW, here https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/UnitOfWork.php#L2217 i can't identify anything that "skips" the non-owing side of an association.

I have also created a PR https://github.com/doctrine/doctrine2/pull/1139 that is related to my question.
I'm trying to implement the proposed PR, but I need to understand this first.



 Comments   
Comment by Asmir Mustafic [ 18/Sep/14 ]

I prefer to move this issue to https://github.com/doctrine/doctrine2/pull/1139





[DDC-3311] Add ESCAPE clause support after LIKE pattern, in Expr class Created: 17/Sep/14  Updated: 20/Sep/14

Status: Open
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: 2.4.4
Fix Version/s: None
Security Level: All

Type: Improvement Priority: Minor
Reporter: Vincent Bories-Azeau Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Actually, it is not possible to specify an ESCAPE character in a LIKE clause.
The Expr::like method only takes two arguments, and an optional third one shall be added.
Behaviour in common databases shall be checked, but I guess ESCAPE belongs to the ISO specification



 Comments   
Comment by Marco Pivetta [ 17/Sep/14 ]

Can you add a few usage examples? What APIs are affected?

Comment by Vincent Bories-Azeau [ 20/Sep/14 ]

Sorry, I don't understand what kind of information you're missing.
The API is the Doctrine\ORM\Query\Expr class, in the ORM.
The need is to improve the like method by addind a third optional parameter, that would allow to push an escape character, which seems to me "standard" SQL.
See LIKE specs in vendors documentation, for usage examples:

Comment by Marco Pivetta [ 20/Sep/14 ]

Vincent Bories-Azeau this is exactly what the kind of feedback I was asking for. As of http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/dql-doctrine-query-language.html#ebnf, the ESCAPE char is actually supported:

LikeExpression           ::= StringExpression ["NOT"] "LIKE" StringPrimary ["ESCAPE" char]

I suppose it just needs to be added to the query builder.

Comment by Vincent Bories-Azeau [ 20/Sep/14 ]

Sure, that's it , using direct DQL for requests, it is possible to write such conditions. However, as you notice it, using the QueryBuilder and the Expr methods, it is not possible to generate such queries. Thanks Marco!





[DDC-3310] [GH-1138] Join column index names Created: 15/Sep/14  Updated: 15/Sep/14

Status: Open
Project: Doctrine 2 - ORM
Component/s: None
Affects Version/s: None
Fix Version/s: None
Security Level: All

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of stanlemon:

Url: https://github.com/doctrine/doctrine2/pull/1138

Message:

@Ocramius recommended I open this up to discuss the issue I am seeing.

I am trying to explicitly name the index on a column which is used in a join. I've attempted to add two functional tests in this PR to demonstrate what I am seeing. Please forgive me if these tests are not correctly, this is the first time I've attempted to submit a PR like this.

There are two situations I am encountering...

First, I explicitly name the index in the ```@Table``` annotation on the column used in the join - but the SQL generated from ```SchemaTool``` appears to be a random hash.

Second, when I have an existing database table with an existing index and it's named properly (in this example, idx_maker_id) and then I run ```SchemaTool->updateSchema()``` it drops the index with the proper name and creates a new randomly hashed name.

Is there a different way of accomplishing what I am trying to do here, or is this a bug?

Thanks for your help and assistance!






[DDC-3309] [GH-1136] add option to skip specific namespace Created: 14/Sep/14  Updated: 14/Sep/14  Resolved: 14/Sep/14

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: None
Affects Version/s: None
Fix Version/s: None
Security Level: All

Type: New Feature Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Incomplete Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of caseycs:

Url: https://github.com/doctrine/doctrine2/pull/1136

Message:

to EntityGenerator and GenerateEntitiesCommand

gives ability to create and update entities, that are stored by psr-4 standard



 Comments   
Comment by Doctrine Bot [ 14/Sep/14 ]

A related Github Pull-Request [GH-1136] was closed:
https://github.com/doctrine/doctrine2/pull/1136





Generated at Sun Sep 21 00:02:09 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.