-
1. Re: Way Cool - Entity Base Relationships
graysonpierce Dec 29, 2004 12:23 AM (in response to mduffy_lists)I did exactly that but seem to get null values for the inherited fields. I created a class without Entity annotation that only has the getter/setter methods that an entity class extends. The entity inherites the getter/setter methods just fine and even the SQL debug shows the inherited columns being called as part of the select statement however when doing the get from a remote client I seem to get nulls for inherited fields but actual values for the "native" fields.
The tutorial example seems to be inheritance between two entity beans and the only thing different in my case is I don't want the parent class persisted.
Any idea, what's going on? -
2. Re: Way Cool - Entity Base Relationships
mduffy_lists Dec 29, 2004 2:11 AM (in response to mduffy_lists)If you don't want the fields in the parent class persisted, try marking them as @Transient
Please let me know if this works.
Mike -
3. Re: Way Cool - Entity Base Relationships
graysonpierce Dec 29, 2004 4:50 PM (in response to mduffy_lists)Hello Mike
Thanks for the quick response. I'm not sure how @Transient would work since I don't want the entire bean persisted and not just individual fields.
If you mark all fields transient does the entire bean become transient?
However my mistake was that the parent class didn't have
implements java.io.Serializable
Once I put this in it started working and didn't need any another annotations including @Entity.
Thanks agian. -
4. Re: Way Cool - Entity Base Relationships
silbunn Feb 25, 2005 7:40 AM (in response to mduffy_lists)I am trying to do the same in the latest preview 3 but I am getting the folowing error while deployed:
12:34:40,375 ERROR [Ejb3Module] Starting failed jboss.j2ee:service=EJB3,module=evaluate.ejb3
java.lang.NullPointerException
at org.jboss.ejb3.entity.EntityToHibernateXml.getDeclaredEntityProperties(EntityToHibernateXml.java:400)
I have tried using @Entity, @Column and also without them but same results every time...
Any idea how to solve it?