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

Calculated properties should be able to override an existing property #764

Closed
chapmandu opened this issue Apr 13, 2017 · 2 comments
Closed
Labels

Comments

@chapmandu
Copy link
Contributor

chapmandu commented Apr 13, 2017

It appears that you can't use a calculated property to override an existing column. It appears that wheels ignores the firstname property below and just selects the column from the database unmolested.

component extends="Model" {

  function config() {
    property(
      name="firstname", 
      sql="IFNULL(firstname, 'These are not the properties you are looking for')"
    );
  }

}
@andybellenie
Copy link
Contributor

Agreed it would be welcome to fix this, although I rarely use calculated properties anymore, preferring database specific tools (computed columns when available, triggers if not)

@perdjurner
Copy link
Contributor

Yeah, I would consider this a bug.

@perdjurner perdjurner added the bug label Feb 5, 2018
neokoenig added a commit that referenced this issue Mar 4, 2018
Fix #764 Calculated properties should be able to override an existing…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants