[DBAL-548] [GH-338] Fix foreign table name quotation in schema table and Sqlite platform Created: 18/Jun/13  Updated: 18/Jun/13

Status: Open
Project: Doctrine DBAL
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 deeky666:

Url: https://github.com/doctrine/dbal/pull/338

Message:

This fixes a bug introduced in PR #302 where the foreign table name did not get properly quoted in some circumstances.






[DBAL-537] [GH-330] Cloning Created: 04/Jun/13  Updated: 18/Jun/13  Resolved: 18/Jun/13

Status: Resolved
Project: Doctrine DBAL
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: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates DDC-2313 Deep clone for DBAL QueryBuilder Resolved

 Description   

This issue is created automatically through a Github pull request on behalf of Tim-Erwin:

Url: https://github.com/doctrine/dbal/pull/330

Message:

This adds deep clone support to the DBAL QueryBuilder. I just realized, there is already a pending pull request for this, however, this one already incorporates the suggestions found in the former.



 Comments   
Comment by Doctrine Bot [ 18/Jun/13 ]

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





[DBAL-541] [GH-334] Fixed Unit Tests Created: 10/Jun/13  Updated: 18/Jun/13  Resolved: 18/Jun/13

Status: Resolved
Project: Doctrine DBAL
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: Invalid Votes: 0
Labels: None


 Description   

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

Url: https://github.com/doctrine/dbal/pull/334

Message:



 Comments   
Comment by Doctrine Bot [ 10/Jun/13 ]

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





[DBAL-542] [GH-335] Quoting table name Created: 12/Jun/13  Updated: 18/Jun/13  Resolved: 18/Jun/13

Status: Resolved
Project: Doctrine DBAL
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: Invalid Votes: 0
Labels: None


 Description   

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

Url: https://github.com/doctrine/dbal/pull/335

Message:

As talked with Blanco.
Quoting table name to avoid errors with:
```sql
SELECT * FROM order;
```
it was possible doing
```php
ORM\Table(name="`order`");
```
But if I change the database, I should change all my entities to the "new quotes"

this way, we can avoid this errors in a "transparent" way.



 Comments   
Comment by Doctrine Bot [ 15/Jun/13 ]

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





[DBAL-546] [GH-337] Add getBindingType() method in DecimalType Created: 17/Jun/13  Updated: 18/Jun/13  Resolved: 18/Jun/13

Status: Resolved
Project: Doctrine DBAL
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: Invalid Votes: 0
Labels: None


 Description   

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

Url: https://github.com/doctrine/dbal/pull/337

Message:

Hi,

I was trying to use the findBy method from the repository, where some of the criteria data were negative floats values. I didn't get any results, though I had coincidental records in the BD with that criteria.

After searching I found this issue: http://stackoverflow.com/questions/8300208/php-pdo-prepare-negatives-become-positive

So, it seemed the problem was caused for the same reason. I've added the getBindingType() returning the PDO::PARAM_INT constant and now my findBy is returning the results correctly.



 Comments   
Comment by Doctrine Bot [ 18/Jun/13 ]

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





[DBAL-547] Evaluate moving away from prepared statements to sprintf() Created: 18/Jun/13  Updated: 18/Jun/13

Status: Open
Project: Doctrine DBAL
Component/s: None
Affects Version/s: None
Fix Version/s: None
Security Level: All

Type: New Feature Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None


 Description   

We are using prepared statements and parsing on top at the moment to implement things like array param quoting and such.

We should evaluate if it makes sense to introduce a strategy for preparing/parsing queries and make sprintf() usage a default in 3.0 instead of using prepared statements. At least for MySQL the PHP Driver guys are arguing for this kind of processing for years.






[DBAL-545] [GH-336] Fixing error code on DBALException (forwarding SQL Error Code). Created: 14/Jun/13  Updated: 15/Jun/13  Resolved: 15/Jun/13

Status: Resolved
Project: Doctrine DBAL
Component/s: None
Affects Version/s: None
Fix Version/s: None
Security Level: All

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Marco Pivetta
Resolution: Invalid Votes: 0
Labels: None


 Description   

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

Url: https://github.com/doctrine/dbal/pull/336

Message:

'0' was the previous hardcoded error code. I'm just forwarding whatever SQL Error code might occur during a query.

Previous to this fix, we'd have to check for whatever Exception was thrown before DBALException in order to get the error code.

Useful when trying to come up with user-friendly error messages.



 Comments   
Comment by Doctrine Bot [ 15/Jun/13 ]

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





[DBAL-489] [GH-302] [DBAL-374] Fix asset identfier quotation Created: 08/Apr/13  Updated: 14/Jun/13  Resolved: 14/Jun/13

Status: Resolved
Project: Doctrine DBAL
Component/s: None
Affects Version/s: None
Fix Version/s: None
Security Level: All

Type: Improvement Priority: Major
Reporter: Doctrine Bot Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


 Description   

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

Url: https://github.com/doctrine/dbal/pull/302

Message:

This PR introduces a real solution for the issues discussed in DBAL-374(http://www.doctrine-project.org/jira/browse/DBAL-374).
It adds the possibility to retrieve quoted column names from <code>Index</code> and <code>ForeignKeyConstraint</code> assets if it is necessary (e.g. column name is a keyword reserved by the platform).
In general column names are wrapped into an abstraction class <code>Identifier</code> which inherits from <code>AbstractAsset</code> inside <code>Index</code> and <code>ForeignKeyConstraint</code>. This allows to get a quoted representation of each column name via the <code>AbstractAsset::getQuotedName</code>.
All platforms are updated to make use of the new functionality.



 Comments   
Comment by Doctrine Bot [ 14/Jun/13 ]

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

Comment by Marco Pivetta [ 14/Jun/13 ]

Merged at https://github.com/doctrine/dbal/commit/b18ab96824a38b03227b11ba27c3b48e33f47b86





[DBAL-533] [GH-327] #DDC-2313: QueryBuilder Deep Cloning Created: 27/May/13  Updated: 13/Jun/13

Status: Open
Project: Doctrine DBAL
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 pmen:

Url: https://github.com/doctrine/dbal/pull/327

Message:



 Comments   
Comment by Doctrine Bot [ 13/Jun/13 ]

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





[DBAL-544] Where's the Query::HYDRATE_BOTH constant? Created: 12/Jun/13  Updated: 13/Jun/13

Status: Reopened
Project: Doctrine DBAL
Component/s: None
Affects Version/s: 2.3.4
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Julio Montoya Assignee: Marco Pivetta
Resolution: Unresolved Votes: 0
Labels: Query::HYDRATE_BOTH
Environment:

Doctrine 2.3.4 DBAL + ORM, using Silex



 Description   

In the documentation of the the ResultStatement::fetch() function says that we should use the Query::HYDRATE_* constants but that constant does not exist at least not in 2.3.4.

Should I just use PDO::FETCH_BOTH? But if I change the driver to sqlite or whatever is it going to work well?



 Comments   
Comment by Marco Pivetta [ 12/Jun/13 ]

Query constants are defined in AbstractQuery (superclass of the Query class) - see https://github.com/doctrine/doctrine2/blob/2.3.4/lib/Doctrine/ORM/AbstractQuery.php#L45-L60

Comment by Julio Montoya [ 12/Jun/13 ]

Hello Marco! Thanks for your fast answer!
Some comments: The constant HYDRATE_BOTH doesn't exist, at least not with that name. Documentation should be updated too.
Another thing I'm obliged to use ORM to call a constant in DBAL? Not a problem for me because I need both

Comment by Marco Pivetta [ 12/Jun/13 ]

Sorry, confused this one as an ORM issue.

Comment by Marco Pivetta [ 12/Jun/13 ]

Checked briefly - you should indeed use the `PDO::FETCH_*` constants.

Can you link the document that contains the imprecision?

Comment by Julio Montoya [ 12/Jun/13 ]

This is the documentation in the fetch(), fetchAll() functions in DBAL:

https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Driver/ResultStatement.php#L61

For example, if I want to fetch an Object what should I use 1. or 2. ? I don't know if this have some implications in other drivers.

1. $statement->fetch(\Doctrine\ORM\Query::HYDRATE_OBJECT);
2. $statement->fetch(PDO::FETCH_OBJ);

An update to the documentation will be fine too:

http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/data-retrieval-and-manipulation.html#using-prepared-statements

it should be:

fetch($fetchMode)

instead of

fetch($fetchStyle)

with a list of options (constants) ...

Comment by Julio Montoya [ 13/Jun/13 ]

Working in a PR but first we need to define those constants ...

https://github.com/jmontoyaa/dbal/commit/d3a44589cdef6c146592eee2b2bd9f8907dadd1f





Generated at Wed Jun 19 19:36:02 UTC 2013 using JIRA 5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5.