Hi Matthias,
I was seeing this: my booleans were "bit(1)" values and impossible to
understand using either command-line mysql, or the gui query browser. My
platform is OSX, MySQL 5.0.56-std, using hibernate.
The application worked fine, but it was difficult to see what was going on
at a low-level. So, I explicitly set the data type for by boolean columns
to varchar(1) as:
use char for boolean value:
@Column(name = "account_enabled", nullable = false, columnDefinition =
"varchar(1)")
private boolean enabled;
while this uses a MySQL bit value:
@Column(name = "is_validated", nullable = false)
private boolean validated = false;
I also have this hibernateProperties line:
hibernate.query.substitutions=true 'Y', false 'N'
I'm not sure why this would affect your authentication, unless the default
data was incorrect to start with.
Hope it helps,
Jason
Matthias Richter-3 wrote:
>
> Hi,
>
> I ran into following issue. When trying the Appfuse tutorials using JPA, I
> could not log in with the standard username / password combination.
> Looking
> into the database (mysql 5) revealed that in the app_user table the fields
> account_expired, account_locked and credentials_expired have the datatype
> bit. It seems that a JPA-annotated boolean does not lead to valid
> mysql5-bit
> values. Does anybody have an idea how to solve it? See
> http://www.mindbug.org/2008/03/type-conversion-with-jpa.html for further
> information.
>
> Cheers
>
> Matthias
>
>
--
View this message in context:
http://www.nabble.com/Missing-JPA-Type-Conversion-tp21069932s2369p21138167.html
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]