- This topic has 2 replies, 2 voices, and was last updated 17 years ago by
Sean Parsons.
-
AuthorPosts
-
Sean ParsonsMemberIt seems that when the JPA rev engy process creates the POJO classes, it creates the member variables – that reference other reverse engy objects with UPPER case names.
Example:
Tables: Group, Person, Address1toN Person in Group and 1toN Address in Person…
Address contains a Person member variable, but the problem is…
private Person Person;
This goes against convention. While thinking about changing it (manually), I have to change the setter classes to match that as well, and that’s a heck of a lot of work across a database with lots of tables.
The sad/funny thing is, when I went to change the member variable back to “Person” from “person”, I get the following message:
“The field name is discouraged. According to convetion, field names shold start with lowercase letters”…apparently JPA rev engy ignores this “convention”?
Can you guys fix this???
June 27, 2008 at 2:04 pm #286430
Brian FernandesModeratorI’d like you to confirm this for me, you’re saying all fields do not have this case problem, only fields which are references to other Entities are problematic?
I tried this and could not replicate. What I saw generated was
private Person person;
. Can you tell me what database, and driver you are using?
Also, in the @Table annotation for your entity, is the name attribute all upper (name = “PERSON”) or (name = “Person”)? Do you have case sensitive names for your tables?June 28, 2008 at 12:17 am #286442
Sean ParsonsMemberDB2 390 on the z/OS
v. 8.1 FP14
@Table name is uppercase. I do not believe so on the last question.
However, if the object has a reference to other entities, it acls like the object var name is pretty much the exact same case as it’s object name.. like my simple example: private Person Person;
It did this in 6.5M1, and just retried on GA..same issue.
-
AuthorPosts