Hello,
I would like to have your advice about something.
First, details on my environment : I use Hibernate 3.2.6.ga and ehcache 1.4.1.
I have a class with a generated id. But my application uses a unique property to search the entities and I would like to use ehcache according this unique property. So, the solution I've found is to set the Id annotation on my property.
Code:
@Entity
@Table(....)
public class EntityA {
@Generated(GenerationTime.INSERT)
@Column(unique=true)
private Integer id;
@Id
private String uniqueProperty;
...
}
There's a difference between the database table and the entity.
So, my question : according to you, could it become a problem ?
Thank you.