-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Basic value types: serializable
PostPosted: Sun Jan 27, 2008 12:05 pm 
Newbie

Joined: Sun Jan 06, 2008 7:52 am
Posts: 3
Hallo Zusammen,

ich habe ein Problem mit dem mapping von dem Type serializable. Vielleicht jemand kann mir weiter helfen.
Hier ist die Erklärung des Handbuch Hibernat über den Type: serializable:
serializable
Maps serializable Java types to an appropriate SQL binary type. You may also indicate the Hibernate type serializable with the name of a serializable Java class or interface that does not default to a basic type.


Hier ist meine Klasse:

Code:
@Entity
@Table(name = "project")
@Inheritance(strategy = InheritanceType.JOINED)
public class Project
    extends BasicEntity
{
    private static final long serialVersionUID = 1L;

    private String name;

    private ArrayList<PickerParcelLocationTO> toList;

    @Column(nullable = false, unique=true)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public ArrayList<PickerParcelLocationTO> getToList() {
        return toList;
    }

    public void setGraphs(ArrayList<PickerParcelLocationTO> toList) {
        this.toList= toList;
    }


wobei die Klasse PickerParcelLocationTO:
Code:
public class PickerParcelLocationTO
   implements Serializable
{
   private static final long serialVersionUID = 1L;

   public int x;

   public int y;

   public int z;
   
   /**
    * Erzeugt eine neue Instanz von PickerParcelLocationTO.
    *
    * @param x Feinpositionierung, horizontal in mm.
    * @param y Feinpositionierung, vertikal in mm.
    * @param z Feinpositionierung, Tiefe in mm.
    */
   public PickerParcelLocationTO(int x, int y, int z) {
      this.x = x;
      this.y = y;
      this.z = z;
   }
}


Das Problem ist, dass Hibernate das Object PickerParcelLocationTO gar nicht ins Tabelle als Binary Type gespeichert.

Wäre sehr nett, wennn jemand mir weiter helfen könnte.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.