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
How to make id
more clear.
#23
Comments
Nothing in If I were to make a dev-centric constraint, it would be in the .commit function of |
I think it would be problematic if |
Just out of interest though, what do you use to handle an auto-increment sequence for id's (in the context that I'm coming from an experience where the SQL based ORM just did it for you)? |
It's up to you to implement your id scheme. There a lots of modules that You can't just let a database give you a new entity id, because that column In general, though, if you search around you'll find lots of arguments If I'm creating entities that won't likely need to be sharded in any If my data will be sharded alphabetically, numerically, by location, etc, On Thu, Sep 15, 2016 at 6:43 PM, Andrew Eddie notifications@github.com
|
After fiddling a bit, I've realised that the
id
property on anEntity
is more or less a required property when it comes to integrating it with aRepository
. That's not altogether obvious from the outset.Perhaps it would be worth adding a
setId
andgetId
method toEntity
. ARepository
can then replaceentity.id
withentity.getId()
and now it's using an interface rather than being tightly coupled to a naming convention.Thoughts?
The text was updated successfully, but these errors were encountered: