mirror of
https://github.com/doctrine/orm.git
synced 2026-04-24 06:58:19 +02:00
DDC-43: offset and limit are in the wrong order (at least SQLite) #53
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Oct 12, 2009).
Originally assigned to: @jwage on GitHub.
Jira issue originally created by user itoijala:
The following code creates an error:
Code:
Error:
SQLSTATE[HY000]: General error: 1 near "OFFSET": syntax error
The DQL:
SELECT e FROM Model\Guestbook\Entry e WHERE (e.dateDeleted IS NULL) AND (e.unlocked = TRUE) ORDER BY e.dateCreated DESC
The SQL:
SELECT g0_.id AS id0, g0_.name AS name1, g0_.email AS email2, g0_.homepage AS homepage3, g0_.content AS content4, g0_.comment AS comment5, g0_.unlocked AS unlocked6, g0_.date_created AS date_created7, g0_.date_updated AS date_updated8, g0_.date_deleted AS date_deleted9, g0_.creator_id AS creator_id10, g0_.updater_id AS updater_id11, g0_.deleter_id AS deleter_id12 FROM guestbook_entries g0_ WHERE (g0_.date_deleted IS NULL) AND (g0_.unlocked = 1) ORDER BY g0_.date_created DESC OFFSET 0 LIMIT 15
SQLite expects offset to come after limit. writeLimitClause in AbstractPlatform works correctly and is not overriden by SqlitePlatform. This means that the bug is somewhere else. writeLimitClause is not called.
@doctrinebot commented on GitHub (Oct 12, 2009):
Issue was closed with resolution "Fixed"