Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FooX issue when tablename == columnname #277

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

FooX issue when tablename == columnname #277

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Dec 27, 2011

Fixes an issue where, when the tablename and columnname were the same, subsonic would not read from or update the database column.

The generator correctly recognizes the column and, in the case that it shares a name with the table, appends an "X" (e.g.,
CREATE TABLE foo
(
foo varchar
);

would create an object for table foo, containing a member, fooX. However, reading from fooX would not match what was actually in the datastore, and setting fooX and saving would throw an exception.

Closes #276

@ajtatum
Copy link

ajtatum commented Mar 5, 2012

I'm not sure if my issue is exactly this or if this isn't working properly, but I have a table named Products and a column named Product. After generating the code, SubSonic still insists on the column being ProductX... which is fine if it actually mapped properly and didn't case the code to error out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Members not populated or saved when fieldName == tableName [fix code inside]
1 participant