|
If I use "@Column(length=25)" on a String field, it creates the field in the database at a length of 25 as expected. If I move the annotation to the getter for the field, it appears to have no effect. The generated SQL confirms that it uses the length limit in one case but not the other. I have a program that re-creates the database from scratch when it runs; it runs fine in both cases with no error, but makes no use of the length in the second case that I can tell.
I feel certain that there's something that I'm missing, that this can't possibly have gone unnoticed, but I cannot find anything to indicate that it's a known problem, or that there is something else that is supposed to be in the program that I don't have there.
The program is run with a Derby running in server mode; the word "create" is passed on the command line (not case sensitive)`
|