[Doctrine] #1704: Searchable behavior bug when primary key is not an integer

4 views
Skip to first unread message

Doctrine

unread,
Nov 30, 2008, 11:05:26 PM11/30/08
to doctri...@googlegroups.com
#1704: Searchable behavior bug when primary key is not an integer
-----------------------------------+----------------------------------------
Reporter: ctigglet | Owner: jwage
Type: defect | Status: new
Priority: minor | Milestone:
Component: Searchable | Version: 1.0.3
Keywords: | Has_test: 0
Mystatus: Pending Core Response | Has_patch: 1
-----------------------------------+----------------------------------------
I discovered a bug where the Searchable behavior fails if the primary key
is anything other than an integer. I tracked the bug down and created the
attached patch.

--
Ticket URL: <http://trac.doctrine-project.org/ticket/1704>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper

Doctrine

unread,
Dec 1, 2008, 8:55:12 AM12/1/08
to doctri...@googlegroups.com
#1704: [PATCH] Searchable behavior bug when primary key is not an integer

-----------------------------------+----------------------------------------
Reporter: ctigglet | Owner: jwage
Type: defect | Status: new
Priority: minor | Milestone:
Component: Searchable | Version: 1.0.3
Keywords: | Has_test: 0
Mystatus: Pending Core Response | Has_patch: 1
-----------------------------------+----------------------------------------

--
Ticket URL: <http://trac.doctrine-project.org/ticket/1704#comment:1>

Doctrine

unread,
Dec 1, 2008, 10:33:17 AM12/1/08
to doctri...@googlegroups.com
#1704: [PATCH] Searchable behavior bug when primary key is not an integer

-----------------------------------+----------------------------------------
Reporter: ctigglet | Owner: jwage
Type: defect | Status: new
Priority: minor | Milestone:
Component: Searchable | Version: 1.0.3
Keywords: | Has_test: 0
Mystatus: Pending Core Response | Has_patch: 1
-----------------------------------+----------------------------------------

Comment(by romanb):

I think the original implementation as well as the patch are flawed. I
dont think databases other than mysql will allow numeric values to be
quoted. A proper solution would be to construct a prepared statement and
bind the parameters.

--
Ticket URL: <http://trac.doctrine-project.org/ticket/1704#comment:2>

Doctrine

unread,
Dec 1, 2008, 11:06:14 AM12/1/08
to doctri...@googlegroups.com
#1704: [PATCH] Searchable behavior bug when primary key is not an integer

-----------------------------------+----------------------------------------
Reporter: ctigglet | Owner: jwage
Type: defect | Status: new
Priority: minor | Milestone:
Component: Searchable | Version: 1.0.3
Keywords: | Has_test: 0
Mystatus: Pending Core Response | Has_patch: 1
-----------------------------------+----------------------------------------

Comment(by ctigglet):

I went back and did as you suggested and made it into a prepared statement
but not sure I did it in a way that is acceptable.

--
Ticket URL: <http://trac.doctrine-project.org/ticket/1704#comment:3>

Doctrine

unread,
Dec 1, 2008, 9:44:07 PM12/1/08
to doctri...@googlegroups.com
#1704: [PATCH] Searchable behavior bug when primary key is not an integer

-----------------------------------+----------------------------------------
Reporter: ctigglet | Owner: jwage
Type: defect | Status: new
Priority: minor | Milestone: 1.0.5
Component: Searchable | Version: 1.0.3
Keywords: | Has_test: 0
Mystatus: Pending Core Response | Has_patch: 1
-----------------------------------+----------------------------------------
Changes (by jwage):

* milestone: => 1.0.5


--
Ticket URL: <http://trac.phpdoctrine.org/ticket/1704#comment:4>

Reply all
Reply to author
Forward
0 new messages