问题
Jpa 2 metamodel has one known use: type safe criteria query. My question is different: I suppose metamodel can be source of information like length, human friendly description, left-right alligment etc, for example for building pretty GUI table (desktop or web, no matter). I imagine such quasi code:
SomeTable st = buildTable(Person_.class, Person_.surName, Person_.Height)
Tell me, I'm thinking in wrong way? My google research give no result. Or give some info to start reading
EDIT: auto correction, human friendly Column name is not in strict JPA area, but in other annotation family (validation is near to JPA / extension).
来源:https://stackoverflow.com/questions/32284675/retrieve-information-from-jpa-metamodel