We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As the other validators already do, it would be good to enable to validate uniqueness of aliased attributes:
class User extends ActiveRecord\Model { static $alias_attribute = array( 'login' => 'meh_this_is_a_legacy_table' ); static $validates_uniqueness_of = array( 'login' ); }
Currently, the code fails with
Uncaught exception 'ActiveRecord\\DatabaseException' with message '42S22, 1054, Unknown column 'login' in 'where clause''
Using the original name for the attribute is a workaround, but will not look nice with validators:
Meh this is a legacy table is not unique
The text was updated successfully, but these errors were encountered:
I have (hopefully) fixed it in 7ca77757abd4d36447c1ceb028e8b373eec851cf.
Sorry, something went wrong.
This has been fixed in the integration branch. Should be in the master branch shortly.
http://github.com/kla/php-activerecord/commit/c658e7e41df94c000aee836a743c973e2238327a
No branches or pull requests
As the other validators already do, it would be good to enable to validate uniqueness of aliased attributes:
Currently, the code fails with
Using the original name for the attribute is a workaround, but will not look nice with validators:
The text was updated successfully, but these errors were encountered: