-
Notifications
You must be signed in to change notification settings - Fork 276
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
Arguments for ActiveRel.creates_unique, new Association unique
options
#1038
Conversation
unique
options
Just pushed an update to this that makes plain ole' associations' Rubocop is barking and it needs a little refactoring. I'm going to extract the specifics of how a relationship is built from |
Awesome, thanks ;) I've been thinking about the API and I'm honestly not sure how it will be used, but my thought was that by default you might call |
I'm ok with it defaulting to
On Sunday, November 8, 2015, Brian Underwood [email protected]
|
Regarding people who are used to Cypher, I suspect they're generally going to I'm trying to think of what bothers me about the |
That makes sense. I can remove the Hash aspect of the parameter entirely On Monday, November 9, 2015, Brian Underwood [email protected]
|
Sounds good! The only other thing is that I have the slightest of worries that somebody might have a property called |
Let's just stick with a hash, |
Snuck that in during lunch, will set the default |
Cool ;p |
Closed by mistake? |
Yup, sorry about that! |
Arguments for ActiveRel.creates_unique, new Association `unique` options
This is RE: #1035. It forces ActiveRel's
creates_unique
andAssociation
'sunique
option to take an argument.:none
means that all properties are ignored whereCREATE UNIQUE
is concerned, properties will be set after the rel is created, like our current expectations:all
means that any property's change will result in a new rel{on: [keys]}
defines which properties it uses for the matchCalled with no arguments or
true
, it will default to:none
.(This has been edited to reflect the end results. Comments below reflect some earlier content here.)