Hi I am using hibernate and Mysql. I have a class with a boolean attribute called 'active'.
The generated database table has the BIT data type. So far so good.
I want to query this value but I don't know how to do it.
I've tried
SELECT * from table where active = 1
doesn't work, neither the following
SELECT * from table where active = true
I didn't find anything neither in the reference manual nor at Stackoveflow.
Any hint?
Thanks in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…