2 Replies Latest reply on Dec 30, 2005 7:41 PM by Emmanuel Bernard

    ManyToOne Relationship strange problem

    Tinashe B Chipomho Newbie

      Hello guys
      can someone tell me why i am getting this strange entry in my database table
      on PostgreSQL 8 server.
      \254\355\000\005sr\000"....java/lang/String;L\000\004nameq\000~\000\001L\000\011realmTypet\000(Lcom/empryean/security/domain/RealmType;xr\000$com.empryean.domain.BaseDomainObject\223Vg\353HAWe\002\000\004I\000\013updateCountL\000\023firstUpdateDateTimet\000\020Ljava/util/Date;L\000\022lastUpdateDateTimeq\000~\000\004L\000\022lastUpdateUsernameq\000~\000\001xp\000\000\000\000sr\000\022java.sql.Timestamp&\030\325\310\001S\277e\002\000\001I\000\005nanosxr\000\016java.util.Datehj\201\001KYt\031\003\000\000xpw\010\000\000\001\007\376\374R\340x$L\232@sq\000~\000\006w\010\000\000\001\007\376\374R\340x$L\232@t\000\007tinashe\000\000\000\000\000\000\000\002t\000\024 .........0\001q\000~\000(q\000~\000\037sq\000~\000 ?@\000\000\000\000\000\001w\010\000\000\000\002\000\000\000\001q\000~\000"q\000~\000"xsr\000\021java.util.HashSet\272D\205\225\226\270\2674\003\000\000xpw\014\000\000\000\020?@\000\000\000\000\000\001q\000~\000"xq\000~\000"xsq\000~\0002w\014\000\000\000\020?@\000\000\000\000\000\001q\000~\000"x

      I have to classes
      class A {}

      and
      class B{
      @ManyToOne(cascade=CascadeType.REFRESH,fetch=FetchType.LAZY,optional=false)
      private B b
      }

      the database table column for entity B is supposed to have a column of long type to reference the entity A but the generated column is of type bytea and iit contains the above junk ( i suppose its a string representation of entity B ).