Hi,
I have a POJO class which is mapped to a table. I would also like to have a field in the pojo which is not mapped to any tables.
My POJO class
Code:
@Entity(name = "test")
@Table(appliesTo = "test")
class Test {
@Id
@GeneratedValue
private Integer id; // --> Mapped to id column in the table
private byte visibility; // --> Mapped to visibility column in the table
private int shardID ; // --> This is NOT mapped to any column.
.. getters & setters
}
When I use the above POJO, hibernate assumes that shardID column is present in table and tries to look up and fails. Is there any way, I can use annotations to disable this field from getting assumed as a table column ?
Thanks,
Rakesh