Hi,
after couple hours i found solution.
I am using mysql 5.0 with innoDB tables. So problem is in column type bit.
It was always true, no matter if came from xwiki false argument. Xwiki, when
you want to save some document, send right argument - hidden = false, but in
mysql was always true.
So i changed column type to tinyint and change hibernate connection
parameters and it is works. :)
Here is the solution :
1) represent booleans with TINYINT(1)
2) Add to cfg tinyInt1isBit=true & transformedBitIsBoolean=true:
<property
name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.tinyInt1isBit">true</property>
<property
name="hibernate.connection.transformedBitIsBoolean">true</property>
<property
name="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
3) if running hbm2hbmxml, hbm2cfgxml, hbm2java use jdbcconfiguration, not
configuration
Solution original link
http://opensource.atlassian.com/projects/hibernate/browse/HHH-468
I am not quite sure how it will work, when I run createWiki method? Any
opinion?
Jan
On Tue, Jan 6, 2009 at 11:06 AM, Jan Kodera <jan.kodera(a)gmail.com> wrote:
Hi,
i am using xwiki 1.7 and if I edit some document, xwiki change xwd_hidden
in database to 1. So my problem is, i have some custom panels where i run
some sql queries. The documents with this bit is invisible now. How can I
change it ? I mean I want them visible. Can I add input type in wiki editor
(like <input type=hidden name=hidden value=0) or it is nessecary to rewrite
my queries?
Thanks for help
Jan