version in field:
@Column(name = "SAMPLE_STRING") private String sampleString; public String getSampleString(){ return sampleString; }
version in getter:
private String sampleString; @Column(name = "SAMPLE_STRING") public String getSampleString(){ return sampleString; }
It seems both are working well, are there reasons not to use one of them, or just a good practice why I should prefer one of them? Is any one of them safer/better/desirable?