[hibernate-users] Question about annotations
Daniel Rindt
drindt at visetics.com
Wed Sep 8 08:24:31 EDT 2010
hello,
i am new to hibernate, so please grant me some questions.
My hibernate session uses the MySQLDialect.
1. Empty fields in the Model are not NULL in db. My definition:
@Size(max = 50)
private String title;
In the db is later an empty string, the @NotNull annotation also
is not working because its an emptry String ""
2. Unique fields are not working?
@Email
@Column(unique = true)
@Size(min = 7, max = 50)
private String email;
The email field should be unique in database, but it is not. And in
the structure of the table also not defined as unique.
Someone can give me a clue please?
TIA
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://lists.jboss.org/pipermail/hibernate-users/attachments/20100908/45f06927/attachment.bin
More information about the hibernate-users
mailing list