logo
Ask your Symfony questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$4
Unknown record property Doctrine_Record_UnknownPropertyException

I try to generate a new module:


./symfony doctrine:generate-admin tastingnotes  CurrentLayoutScreenRecreated   --module=tasting


When I point my browser at the newly created module, at tastingnotes_dev.php/tasting/index, I get:

500 | Internal Server Error | Doctrine_Record_UnknownPropertyException
Unknown record property / related component "bot2nd_sql" on "CurrentLayoutScreenRecreated"


There is no bot2nd_sql in my schema.yml, but there is a bot_2nd_sql. It's almost as if Symfony is not seeing the first underscore? You look at the stack trace screen shot that I've uploaded - you can see the error develop.

This is what I have in my schema.yml:


CurrentLayoutScreenRecreated:
actAs: { Timestampable: ~ , Taggable: ~ }
tableName: tastingnotes
columns:
id:
type: integer
primary: true
autoincrement: true
name_calc_sql: string(255)
appelation_sql: string(255)
region_sql: string(255)
country_sql: string(255)
specdes_sql: string(255)
color_sql: string(255)
botsize_sql: string(255)
cycle_sql: string(255)
date_requested_sql: string(255)
wineryful_sql: string(255)
winery_sql: string(255)
importer_sql: string(255)
type_sql: string(255)
subt_sql: string(255)
comments_sql: string(255)

order_sql: string(255)
alternate_auction_name_sql: string(255)
bot_2nd_sql: string(255)
bot_2nd_request_sql: boolean
bot_code_sql: string(255)
caseimp_sql: string(255)
caseprod_sql: string(255)
ccode_sql: string(255)
ce_date_1_sql: string(255)
copy_edited_sql: string(255)
copy_editor_1_sql: string(255)
created_sql: string(255)
created_by_sql: string(255)
curprice_sql: string(255)
date_recvd_sql: string(255)
donotpub_sql: boolean
drink_recom_sql: string(255)
flight_sql: string(255)
fullname_sql: string(255)
hot_wine_sql: boolean
insider_sql: boolean
insider_issue_sql: string(255)
issue_sql: string(255)
last_update_sql: string(255)
latest_note_sql: clob
mod_time_sql: string(255)
modified_sql: string(255)
modifier_sql: string(255)
name_calc_sql: string(255)
office_sql: string(255)
price_sql: string(255)
print_note_sql: boolean
rating_sql: string(255)
recor_id_sql: string(255)
rt_ok_sql: boolean
score_sql: string(255)
tasted_twice_sql: boolean
tastedate_sql: string(255)
taster_sql: string(255)
tasting_highlights_sql: string(255)
tasting_id_sql: string(255)
tca_sql: boolean
tca_final_sql: boolean
td_sql: string(255)
td_b_sql: string(255)
top_100_sql: string(255)
top_100_year_sql: string(255)
total_r_sql: string(255)
tyear1_sql: string(255)
tyear2_sql: string(255)
vintage_sql: string(255)
warning2_sql: string(255)
web_only_sql: string(255)


This question has been answered.

attachment image asker uploaded image

Lawrence Krubner | 11/03/10 at 5:53pm Edit


(1) Responses

See a threaded view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    11/04/10
    11:10am
    Jakub Zalas says:

    Try defining an alias:


    CurrentLayoutScreenRecreated:
    actAs: { Timestampable: ~ , Taggable: ~ }
    tableName: tastingnotes
    columns:
    ....
    bot_2nd_sql
    name: bot_2nd_sql as bot2nd_sql
    type: string(255)
    ....


    This tells doctrine that your column in the database is called bot_2nd_sql and it can be accessed with bot2nd_sql.

    If it still doesn't work than I would get rid of number in alias as it is confusing for doctrine:


    columns:
    bot_second_sql:
    name: bot_2nd_sql as bot_second_sql

This question has expired.





Current status of this question: Completed



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.