Wednesday, March 15, 2006

Custom ID problem

One design flaw in the original that I am trying to correct is the custom id. A custom id was generated in the old way based on the size of a list. It was made to be negative and within a certain range so no overlap would occur with non custom ids. This is pretty bad. Also because custom chapters are given IDs in the database it gets weird because newly loaded custom stuff is either given an overlapping id, has its ID mutated in some way (make it negative) or has a newly generated ID. I forget which. Anyway, I am hoping that in the future IDs can be made unique by making them a string. I haven't done this yet. Again because Back-End stuff may effect this. Currently IDs can overlap but not within a type. So when it is possible to get the wrong ID (for instance when removing) type is also checked.

So not a great situation, but easy to fix.

0 Comments:

Post a Comment

<< Home