2 Replies Latest reply on Nov 25, 2005 4:52 AM by Emmanuel Bernard

    JBoss Truncates at startup

    Anders Norrbom Newbie

      Im using JBoss 4.0.3SP1 with EJB3 and Postgres 7.4.8.
      I just got a very simple EntityBean to work and I noticed that JBoss truncates the table its mapped to every time I restart JBoss. It seems very strange to me, but Im sure there must be a simple explanation to this.

      Thanks

      @Entity
      @Table(name = "mytable")
      public class Account implements Serializable {

      private static final long serialVersionUID = 3471678676661265287L;

      private String loginemail;
      private String password;
      private String token;
      private String parentemail;
      private int partnerid;

      public Account(){}

      public Account(String loginemail, int partnerid) {
      this.loginemail = loginemail;
      this.partnerid = partnerid;
      }

      public Account(String loginemail, String parentemail, int partnerid) {
      this.loginemail = loginemail;
      this.parentemail = parentemail;
      this.partnerid = partnerid;
      }

      @Id
      public String getLoginemail() {
      return loginemail;
      }
      public void setLoginemail(String loginemail) {
      this.loginemail = loginemail;
      }
      public String getParentemail() {
      return parentemail;
      }
      public void setParentemail(String parentemail) {
      this.parentemail = parentemail;
      }
      public int getPartnerid() {
      return partnerid;
      }
      public void setPartnerid(int partnerid) {
      this.partnerid = partnerid;
      }
      public String getPassword() {
      return password;
      }
      public void setPassword(String password) {
      this.password = password;
      }
      public String getToken() {
      return token;
      }
      public void setToken(String token) {
      this.token = token;
      }
      }