2 Replies Latest reply on May 22, 2009 8:10 PM by Nico Wollenzin

    IdentityManager @UserEnabled and PostgreSQL

    Nico Wollenzin Newbie

      Hi there,


      I think I have found something like a Bug.


      When I am trying to create a User with IdentityManager I get this Error.




      Caused by: java.sql.BatchUpdateException: Batch-Eintrag 0 update NutzerKonto set nutzername\=Nico, passwort\=AftaxWu7\+ABmdIVna4HqYw\=\=, nutzer\_ID\=100, freigeschaltet\=1 where ID\=100 wurde abgebrochen.  Rufen Sie 'getNextException' auf, um die Ursache zu erfahren.




      On my Postgres cosole I get a quite more detailed Error that says, that freigeschaltet (@UserEnabled annotated) is integer and should be boolean


      Trying to deploy the seamspace example gives the following message:



      Caused by: org.postgresql.util.PSQLException: FEHLER: Spalte »enabled« hat Typ boolean, aber der Ausdruck hat Typ integer




      poorly translated:



      ERROR: Column »enabled« is of type boolean but the expression is of type integer.




      Greets


      Nico

        • 1. Re: IdentityManager @UserEnabled and PostgreSQL
          Paul Tillotson Newbie

          This is not necessarily a bug--there's a mismatch between what type of column hibernate is expecting and what type the column actually is.


          Since most databases don't have a native boolean type, hibernate represents a boolean values with 1 and 0.


          Did you create this database table yourself?  If so, just change it to NUMERIC(1). 


          If not, post details of how you created it?  (Did you use hibernate)  Maybe someone can suggest the right way to create it.

          • 2. Re: IdentityManager @UserEnabled and PostgreSQL
            Nico Wollenzin Newbie

            I let Hibernate create the Database in both cases.


            And I tried to change the boolean to numeric in my own Project, but it doesn't solve the problem.


            SeamSpace recreates the Database after every deploy so I can't change this column.


            I can't believe that this a real bug, postgres isn't that exotic that I am the first one who has this Problem.


            help


            please :-)