As you say, ordinal is a bit risky. Consider for example:
public enum Boolean {
TRUE, FALSE
}
public class BooleanTest {
@Test
public void testEnum() {
assertEquals(0, Boolean.TRUE.ordinal());
assertEquals(1, Boolean.FALSE.ordinal());
}
}
If you stored this as ordinals, you might have rows like:
> SELECT STATEMENT, TRUTH FROM CALL_MY_BLUFF
"Alice is a boy" 1
"Graham is a boy" 0
But what happens if you updated Boolean?
public enum Boolean {
TRUE, FILE_NOT_FOUND, FALSE
}
This means all your lies will become misinterpreted as 'file-not-found'
Better to just use a string representation