Skip to content

Conversation

@pkaeding
Copy link
Contributor

Since it isn't possible to subclass a case class, and implementors may have a different structure for users than the BasicProfile, and in general, it is best to stick to the Robustness Principle (and I'm guessing this is why the GenericProfile trait exists in the first place?)

In my case, I needed this because I am migrating from an old version of SecureSocial, where the IdentityId was a thing. I didn't want to migrate all of my user records in mongo, or tack on a transformation step in my DB layer. I imagine others may have other reasons for wanting to have the freedom to implement GenericProfile differently.

Of course, implementors are still free to just use BasicProfile.

pkaeding added 2 commits April 7, 2015 22:24
…sing the GenericUser trait everywhere. This causes a handful of minor ripple changes in other bits of code.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the extent of real code changes. Since you can't enforce that a GenericProfile has a copy constructor, I'm using the BasicProfile to affect this change.

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.

1 participant