Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6942327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:00:04+00:00 2026-05-27T13:00:04+00:00

My schema: Poster: actAs: Timestampable: ~ Sluggable: fields:[name] columns: id: type: integer(4) autoincrement: true

  • 0

My schema:

Poster:
  actAs:
    Timestampable: ~
    Sluggable:
      fields:[name]
  columns:
    id:
      type: integer(4)
      autoincrement: true
      primary: true
    name:
      type: string(255)
      notnull: true
    filename:
      type: string(255)
      notnull: true
    approved:
      type: boolean(1)
      default: false
    start_date:
      type: date
      notnull: true
    end_date:
      type: date    
      notnull: true  
    user_id:
      type: integer(20)
      default: 1
  attributes:
    export: all
    validate: true
  relations:
    User:
      class: sfGuardUser
      local: user_id
      foreign: id
      type: one
      foreignType: many
      foreignAlias: Posters

I have a module poster generated by doctrine:generate-admin. In the list view, I see the filters for all the fields including start_date and end_date. Now, the problem is, that these two filters are not working as they should. e.g. I provided a range for Start Date and pressed filter, in the response page, I saw the SQL queries tab of the web debug toolbar but there I don’t see any indication for constraining the query according to the provided constraint. I just see this:

SET NAMES 'UTF8'
0.00s, "doctrine" connection

SELECT COUNT(*) AS num_results FROM poster p
0.00s, "doctrine" connection

SELECT s.id AS s__id, s.first_name AS s__first_name, s.last_name AS s__last_name, s.email_address AS s__email_address, s.username AS s__username, s.algorithm AS s__algorithm, s.salt AS s__salt, s.password AS s__password, s.is_active AS s__is_active, s.is_super_admin AS s__is_super_admin, s.last_login AS s__last_login, s.created_at AS s__created_at, s.updated_at AS s__updated_at FROM sf_guard_user s
0.00s, "doctrine" connection

SELECT p.id AS p__id, p.name AS p__name, p.enabled AS p__enabled, p.layout AS p__layout, p.created_at AS p__created_at, p.updated_at AS p__updated_at, p.slug AS p__slug FROM place p
0.00s, "doctrine" connection

SELECT p.id AS p__id, p.name AS p__name, p.filename AS p__filename, p.approved AS p__approved, p.start_date AS p__start_date, p.end_date AS p__end_date, p.user_id AS p__user_id, p.created_at AS p__created_at, p.updated_at AS p__updated_at, p.slug AS p__slug FROM poster p LIMIT 10
0.00s, "doctrine" connection

SELECT s.id AS s__id, s.first_name AS s__first_name, s.last_name AS s__last_name, s.email_address AS s__email_address, s.username AS s__username, s.algorithm AS s__algorithm, s.salt AS s__salt, s.password AS s__password, s.is_active AS s__is_active, s.is_super_admin AS s__is_super_admin, s.last_login AS s__last_login, s.created_at AS s__created_at, s.updated_at AS s__updated_at FROM sf_guard_user s WHERE (s.id = '2') LIMIT 1

Now, as the Poster model is Timestampable, there is a created_at field. I tried to filter the results by giving a range to this field, and in the queries tab, I now see

SELECT COUNT(*) AS num_results FROM poster p WHERE p.created_at >= '2011-12-15 00:00:00' AND p.created_at <= '2011-12-24 23:59:59'

Is that a bug in symfony? Please help.

UPDATE: Ok, I did a little investigation and found that there is no corresponding addFieldNameColumnQuery function in BasePosterFilter.class.php. So again, is that default symfony behaviour or is that some bug?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:00:05+00:00Added an answer on May 27, 2026 at 1:00 pm

    Symfony doesn’t create any addFieldNameColumnQuery for Doctrine (or addFieldNameColumnCriteria for Propel), but simply fields are “mapped” trough own types (Number, Text, Boolean, Date, ForeignKey), as you see in getFields() of a BaseMyModelFormFilter class, assigning the right filter when an input filter is used.

    Instead if you add a new field, say myfield, you have to create a function addMyfieldNameColumnQuery (or addMyfieldNameColumnCriteria) to allows Symfony to get and add the right sql filter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Schema: Users ID Name Password Address ID Street UserID Both tables have an ID
I have an XML schema that includes multiple addresses: <xs:element name=personal_address maxOccurs=1> <!-- address
Ok, so my schema is this: Table: Timesheet_Hours Columns: Timesheet_Id (PK, int) Staff_Id (int)
How do you create binary columns in the DB using SubSonic's Schema builder? So
Rails 2.3.3 Database and Model Schema User (id,name,email) posts (id,subject,message,user_id) How can I display
I'm working on a star schema for analysis of posted form data. The site
My schema specifies a namespace, but the documents don't. What's the simplest way to
XML Schema specifies occurrence indicators (maxOccurrence, minOccurrence). Is there a best practice in which
Example Schema: RowID Quantity ModifiedPrice GroupPrice CustomPrice SalePrice ---------------------------------------------------------------------------- 1 5 20.00 0 15.00
Which Database table Schema is more efficient and why? Users (UserID, UserName, CompamyId) Companies

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.