-->
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.  [ 2 posts ] 
Author Message
 Post subject: ClassValidator Warning:Type of property approximated
PostPosted: Tue Jul 04, 2006 8:32 am 
Beginner
Beginner

Joined: Sat Apr 15, 2006 12:49 pm
Posts: 20
Location: austria
core: 3.2.0.cr2 ,ann: 3.2.0.CR1

Hi,

I'm using the Hibernate Annotation @MappedSuperclass in my class hierarchy with the following structure:

Code:
@MappedSuperclass
public abstract Document <T extends Line> {
   ...
   protected List<T> itemLines = new ArrayList<T>();
   ...
   @Transient
   public abstract List<T> getItemLines();
}

@Entity
@Table(name = "tblPurchaseOrder")
public class PurchaseOrder extends Document<PurchaseOrderLine> {

   @OneToMany(targetEntity=PurchaseOrderLine.class, cascade=CascadeType.ALL)
   @JoinColumn(name="purchaseOrder_fk")
   @IndexColumn(name="positionNumber")
   public List<PurchaseOrderLine> getItemLines() {
      return this.itemLines;
   }
}


I have to provide the abstract method getItemLines as the super class 'Document' is implemented by various sub classes which are mapped on different tables. When I start my application (or hibernatetool) I get the following warnings:

Code:
[hibernatetool] 2006-07-04 14:29:21,608 WARN org.hibernate.validator.ClassValidator - Original type of property public abstract java.util.List sales.Document.getItemLines() is unbound and has been approximated.
[hibernatetool] 2006-07-04 14:29:21,609 WARN org.hibernate.validator.ClassValidator - Original type of property public abstract sales.Line sales.Document.createLine() is unbound and has been approximated.
[hibernatetool] 2006-07-04 14:29:21,610 WARN org.hibernate.validator.ClassValidator - Original type of property itemLines is unbound and has been approximated.


Is there a way to handle this?

thx,

john


Top
 Profile  
 
 Post subject: Java 1.5 Generics and Hibernate
PostPosted: Wed Jul 05, 2006 8:05 am 
Beginner
Beginner

Joined: Sat Apr 15, 2006 12:49 pm
Posts: 20
Location: austria
I just found out that the warnings I mentioned above are gone when I omit the Java Generics stuff. Is it possible that hibernate is not able to take care of entities that use generics?

thx

john


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

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.