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 6832331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:50:45+00:00 2026-05-26T22:50:45+00:00

The relevant portion of my schema.xml : <database name=Inventory defaultIdMethod=native> <table name=Users phpName=User> <column

  • 0

The relevant portion of my schema.xml:

<database name="Inventory" defaultIdMethod="native">
  <table name="Users" phpName="User">
    <column name="UserId" type="varchar" size="20" required="true" primaryKey="true" />
    <column name="FirstName" type="varchar" size="255" required="true" />
    <column name="LastName" type="varchar" size="255" required="true" />
    <column name="Password" type="varchar" size="255" required="true" />
    <column name="Salt" type="char" size="22" required="true" />
    <column name="RoleId" type="integer" required="true" />
    <column name="FailedLogins" type="integer" required="true" defaultValue="0" />
    <column name="LockedOut" type="boolean" required="true" defaultValue="false" />
    <column name="Active" type="boolean" required="true" defaultValue="true" />
  </table>
...
</database>

The following command fails with a PropelException:

UserQuery::create()
    ->filterByActive(true)
    ->update(array('FailedLogins' => 0, 'LockedOut' => false));

The error:

[Sat Nov 19 16:28:01 2011] [error] [client 127.0.0.11] PHP Fatal error:  Uncaught exception 'PropelException' with message 'Cannot fetch ColumnMap for undefined column phpName: FailedLogins' in /home/andrew/pss-repository/vendor/propel/runtime/lib/map/TableMap.php:372\nStack trace:\n#0 /home/andrew/pss-repository/vendor/propel/runtime/lib/query/ModelCriteria.php(1668): TableMap->getColumnByPhpName('FailedLogins')\n#1 /home/andrew/pss-repository/vendor/propel/runtime/lib/query/ModelCriteria.php(1626): ModelCriteria->doUpdate(Array, Object(PropelPDO), false)\n#2 /home/andrew/pss-repository/login-reset-process.php(11): ModelCriteria->update(Array)\n#3 {main}\n  thrown in /home/andrew/pss-repository/vendor/propel/runtime/lib/map/TableMap.php on line 372, referer: http://pss/login-reset-all.php

I am able to verify that the FailedLogins column is identified as Failedlogins in the Propel-generated code. I realize that I can probably add phpName to the columns in question, but I was wondering if I have missed a configuration option. I checked the Propel buildtime configuration page, and I see an option called propel.samePhpName, but as it is under the “Reverse Engineering” section it does not appear to be the option I need. Others have asked similar questions, but I have not seen a clear answer.

Is there a configuration option to make the phpName of each column simply match the name attribute in the schema?

  • 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-26T22:50:46+00:00Added an answer on May 26, 2026 at 10:50 pm

    No there is no way to do that, nor a build property.

    Actually, you should not name your table attributes like you did, you should underscorize them:

    <table name="Users" phpName="User">
      <column name="user_id" type="varchar" size="20" required="true" primaryKey="true" />
      <column name="first_name" type="varchar" size="255" required="true" />
      <column name="last_name" type="varchar" size="255" required="true" />
      <column name="password" type="varchar" size="255" required="true" />
      <column name="salt" type="char" size="22" required="true" />
      <column name="role_id" type="integer" required="true" />
      <column name="failed_logins" type="integer" required="true" defaultValue="0" />
      <column name="locked_out" type="boolean" required="true" defaultValue="false" />
      <column name="active" type="boolean" required="true" defaultValue="true" />
    </table>
    

    That way you’ll get UserId, …, FailedLogins, …

    William

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

Sidebar

Related Questions

I've attached the relevant portion of my web.config file below. When a user attempts
I'm trying to produce a query on the following table (relevant portion only): Create
The relevant snippet of HTML: <span class=a> <div class=fieldname>Question 1</div> <input type=text value= name=q1
Here are the relevant models: User Product Order A User can sell or buy
Here's the relevant bit of the source code: class Dice { String name ;
Hello I have a ScrollBar Template as per below - only relevant portion shown:
I can't find the relevant portion of the spec to answer this. In a
I am working with this XSD file. The portion of the XML that is
Relevant Tables #One# +----------+ +--------------+ |Quotations| ---> |PurchaseOrders| +----------+ | +--------------+ <One> | <Many>
Is PHP still a relevant language in 2017?

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.