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

Masterdetail different idfield #3272

Merged
merged 4 commits into from
Feb 19, 2018
Merged

Masterdetail different idfield #3272

merged 4 commits into from
Feb 19, 2018

Conversation

hannesb
Copy link
Contributor

@hannesb hannesb commented Feb 19, 2018

Sometimes, it makes sense not to use the primary key field of the master table for a master detail relationship. For example if you have a field with a unique constraint on the master table (like a alphanumeric order number in the northwind orders table) and want the master detail relationship to use that field.

This extension of the MasterDetailRelationBehaviour adds this feature.

@volkanceylan
Copy link
Member

I think that's a dangerous way to use master-detail relation, e.g. using a field that might change, and smells like a bad design.

Anyway, please change AltIdField to MasterKeyField and idField to masterKeyField and will merge this one.

@volkanceylan
Copy link
Member

Build broken, you should change in other places as well

@hannesb
Copy link
Contributor Author

hannesb commented Feb 19, 2018

Hmm compiles fine on my machine?!?

@serenity-is serenity-is deleted a comment Feb 19, 2018
@volkanceylan volkanceylan merged commit 18a3101 into serenity-is:master Feb 19, 2018
@hannesb
Copy link
Contributor Author

hannesb commented Feb 19, 2018

Thanks for the merge. I really like to participate in this great project...

@ga5tan
Copy link

ga5tan commented Jul 27, 2018

@hannesb is this supposed to work with MasterFields, that are empty? (ie no details)
cause it's crashing here in EntityGrid, saying "Object reference not set to an instance of object"

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.

3 participants