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

Schema/Field: add foreign_key_reference builder #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrewgregory
Copy link
Contributor

foreign_key_reference was only being set from the is_foreign_key
builder. If a user manually set is_foreign_key, as DBIx::Class does,
foreign_key_reference would never be set, breaking the HTML producer.

foreign_key_reference was only being set from the is_foreign_key
builder.  If a user manually set is_foreign_key, as DBIx::Class does,
foreign_key_reference would never be set, breaking the HTML producer.
@ribasushi
Copy link
Contributor

@andrewgregory Can you please explain what is the exact scenario in which you find is_foreign_key useful? DBIC setting it is a design mistake, and I am planning to remove this at some point (a column marked as a key makes no sense, except in the most basic and trivial of cases).

Can you please elaborate?

@andrewgregory
Copy link
Contributor Author

I don't find it useful; this was really just to fix HTML output for DBIC. Although, if setting is_foreign_key directly isn't going to be supported it should probably be set to is => 'lazy', init_arg => undef to prevent this kind of breakage in the future.

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

Successfully merging this pull request may close these issues.

2 participants