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

ActiveRecord tries to INSERT to Computed Columns and causes SQL Error #275

Open
adame11 opened this issue Oct 4, 2011 · 0 comments
Open

Comments

@adame11
Copy link

adame11 commented Oct 4, 2011

Steps to Reproduce

  1. Create a table with a Computed Column (e.g., 1+2+3)
  2. Generate ActiveRecord.cs and run
  3. Attempt to Save a new object to db (ObjectName.Save(username, providerName) ... or ActiveRecord.Add(providerName)...

Actual Result:
System.Data.SqlClient.SqlException: The column "{0}" cannot be modified because it is either a computed column or is the result of a UNION operator.

Expected Result:
Columns that are IsComputed=1 (true) should be ignored for INSERTs. They should not render a "set" property either. IsComputed is a property of column but it appears to not be honored

For more information, see forum thread:
http://stackoverflow.com/questions/4423613/computed-columns-in-sql-server-with-subsonic

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

No branches or pull requests

1 participant