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

Support id as string #26

Closed
MP0w opened this issue Apr 14, 2016 · 5 comments
Closed

Support id as string #26

MP0w opened this issue Apr 14, 2016 · 5 comments

Comments

@MP0w
Copy link
Member

MP0w commented Apr 14, 2016

should we?

@MP0w
Copy link
Member Author

MP0w commented Apr 17, 2016

@devlucky/kakapo-core

@MP0w MP0w added this to the Beta-1 milestone Apr 17, 2016
@zzarcon
Copy link
Member

zzarcon commented Apr 17, 2016

Yes, that's why I suggested devlucky/Kakapo.js#24.

And basically allow the user to specify the type of id (we can go with autoincrement as default behaviour)

@MP0w
Copy link
Member Author

MP0w commented Apr 24, 2016

I would say that Int will be the default and Storable will use the current implementation (Int). Then We can create a simple protocol CustomStorable or StringStorable or whatever
that has a default implementation that convert the Int to String and add a computed property:

var id: String {
    get {
       return String(id) // the Int id
    }
}

@MP0w MP0w self-assigned this Apr 24, 2016
@MP0w
Copy link
Member Author

MP0w commented Apr 24, 2016

Unfortunately we might need special handling in the Serializer to avoid using the Int in the JSON so maybe it should be the other way around

@MP0w MP0w removed this from the Beta-1 milestone Apr 24, 2016
@MP0w
Copy link
Member Author

MP0w commented Apr 24, 2016

@devlucky/swift-core let's discuss before deciding if it should be in the Milestone... looks like we are not sure if we want this (cc/ @zzarcon )

@MP0w MP0w added this to the Beta-1 milestone May 1, 2016
@MP0w MP0w removed this from the Beta-1 milestone Jun 26, 2016
@MP0w MP0w closed this as completed in #78 Jul 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants