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

Datamanipulation in Form by manipulating FK-PK's in HTML #179

Open
simitter opened this issue Dec 18, 2012 · 0 comments
Open

Datamanipulation in Form by manipulating FK-PK's in HTML #179

simitter opened this issue Dec 18, 2012 · 0 comments

Comments

@simitter
Copy link
Contributor

Hello

data manipulation by changing the hidden id field in html as described in #40 is still possible if the PK field is a FK field too. (Many to Many, One to One)

This is because the ForeignKey check in sfPropelFormGenerator (getValidatorClassForColumn, getValidatorOptionsForColumn) is before the PrimaryKey Check so the normal sfPropelValidatorChoice is used.

Changing the two checks will result in the normal Validator for PK's being used on FK-PK's too but i'm not sure if it's the best course of action since there would be no validation anymore if the FK exists for new objects (therefor no pull request yet).

However, the Widgets are hidden in FK-PK's too (PK Check is before the FK Check) so it seems it's assumed that you have to set your FK-PK manually before creating the form anyway.

Kind regards
Tschebel

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