|
Friday, May 15, 2009
X2O bug: Changing case on existing attributes and entity names
We discovered an X2O bug this morning with case-sensitivity on attributes and entities. The problem appears when you first name an attribute one way (e.g. "BirthDate"), generate your code, then go back later to rename the attribute another way (e.g. birthDate").
If you rename the attribute entirely differently (e.g. "Day I was Born"), X2O will physically remove the "BirthDate" attribute and add a new attribute called "Day I was Born". So, all existing data in the BirthDate attribute will be gone (do be warned!). This is just a fact of how we negotiate database differentials on each generation. Everything will generate successfully. However, by just changing the case of the attribute, we experienced some weirdness. X2O database tables and columns are case-invariant, so table names and field names aren't changed. Unfortunately, other parts of the generation are case-sensitive. This caused all sorts of unencountered errors (things seemingly not mapping to other things) because some code cared about case and others didn't. There's no denying that this is a somewhat poor mistake in programming 101, but the issue hadn't crept its ugly head until recently. A lesson learned. We've since fixed this issue in our working version (this will be in the next release which we're scheduling for early next week). Do note, this only occurs when you change case on an existing attribute or entity. |
||
0 Comments:
Post a Comment
<< Home