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 for bigints/longs #10

Open
elicwhite opened this issue Jul 20, 2012 · 2 comments
Open

Support for bigints/longs #10

elicwhite opened this issue Jul 20, 2012 · 2 comments

Comments

@elicwhite
Copy link
Contributor

There is currently no support for longs as a type.

Using the new type system which ties everything to PHP types might make things difficult since long ints are represented as floats in php, but the datatype mysql is bigint. How would this mesh?

@vlucas
Copy link
Owner

vlucas commented Jul 31, 2012

I would think that a new datatype would have to be added that would ensure a string type in PHP consisting of only numbers (using is_numeric or ctype_digit, or a combination of the two). The type would also have to be added to the adapter.

This seems to bring up a bigger issue with the type system that I discussed with @pnomolos about the types specifying an adapter intermediate type (string, int, bingint, float, decimal, boolean, date, etc.), that then gets mapped by the adapter to a native type. This also brings up that fact that the data types need to run validation logic and set validation errors on the Entity as well. There could be a large new feature here that seems like it would solve all these issues.

@pnomolos
Copy link
Collaborator

I just got home from a couple weeks away and am hoping to begin some serious work on the type system that I had mentioned to @vlucas over the next week or two, which should (hopefully) solve some of the needs with the current type system, or at least be a step in the right direction :)

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

No branches or pull requests

3 participants