Closed lukasj closed 3 months ago
@lukasj I'm not sure I like the idea of doing it for every field. I would have done it only for the fields where a collision occurs.
While that is certainly feasible, I like the naming consistency this (unexpectedly) brings in wrt usage of the trailing underscore - it is the same for the name of the canonical class (Cls_
) and the name of the field (Cls_.ID_
); with static imports this also allows one to easily recognise generated constants from user defined ones.
mmmrmrrmrmrmrrrmmmm I can live with it I guess.
Hold on a sec.
@lukasj, if we're adding a trailing _
, then in principle we no longer need the upper-capitalization. We could let people write:
@OneToMany(mappedBy=Book_.publisher_)
Set<Book> books;
instead of:
@OneToMany(mappedBy=Book_.PUBLISHER_)
Set<Book> books;
WDYT?
well, it's public static final
constant for which the java (naming) convention is to use upper-case
well, it's
public static final
constant for which the java (naming) convention is to use upper-case
I know, but I'm pretty sure we don't need to go to court to break that convention if it's the right thing to do.
fixes #589
this should also handle the case where the name of a named thing is with a dot (ie
Employee.findAll
)