google-code-export / objectify-appengine

Automatically exported from code.google.com/p/objectify-appengine
MIT License
1 stars 0 forks source link

Add support for overriding field name value using javax.persistense.Column #95

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I know this is not JPA but it is potentially valuable to have short column 
names as these name are stored with every value for every record.

Currently the only way to do this is to have entity property names that differ 
from getter/setter names.  It would be great if the following could be done:

@Column(name="shortName");
private String myVeryLongFieldName;

public String getMyVeryLongFieldName() {
    return myVeryLongFieldName;
}

public void setMyVeryLongFieldName(String myVeryLongFieldName) {
    this.myVeryLongFieldName = myVeryLongFieldName;
}

In this case, the actual field name persisted would be "shortName"

Original issue reported on code.google.com by joe...@gmail.com on 1 Jul 2011 at 1:52

GoogleCodeExporter commented 9 years ago

Original comment by lhori...@gmail.com on 5 Jul 2011 at 8:05

GoogleCodeExporter commented 9 years ago

Original comment by lhori...@gmail.com on 14 Apr 2014 at 12:17