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

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

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

Comments

@chapmandu
Copy link
Member

@chapmandu 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

This comment has been minimized.

Copy link
Contributor

@andybellenie andybellenie commented Apr 13, 2017

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

This comment has been minimized.

Copy link
Contributor

@perdjurner perdjurner commented Feb 5, 2018

Yeah, I would consider this a bug.

@perdjurner perdjurner added the bug label Feb 5, 2018
@neokoenig neokoenig closed this in a1e527d Mar 4, 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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.