Matt
We have a class hierarchy such as the following:
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "subclass")
public abstract class SubClass extends BaseObject {
private static final long serialVersionUID = 247081957928058557L;
private Long id;
//.... other properties
@Id
@Column(name = "device_id")
@GeneratedValue(strategy = GenerationType.AUTO)
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
//.... Getters and setters
//.... equals, etc.
}
@Entity
@Table(name = "anothersubclass")
@PrimaryKeyJoinColumn(name = "meter_id")
public class AnotherSubClass extends SubClass {
private static final long serialVersionUID = -947889774626346659L;
private EmbeddedObject embeddedObject;
@Embedded
public EmbeddedObject getRmdConfiguration() {
return rmdConfiguration;
}
public void setRmdConfiguration(RmdConfiguration rmdConfiguration) {
this.rmdConfiguration = rmdConfiguration;
}
//.... equals, etc.
}
@Embeddable
public class EmbeddedObject extends BaseObject implements Serializable {
private static final long serialVersionUID = -5958686457614638827L;
//.... Getters and setters
//.... equals, etc.
}
The only difference I can see between this and the "User and Address"
case is that our class
which embeds another class does not directly inherit from BaseObject.
Would this make a
difference when generating the sample data?
We are experiencing the same problem in our web project when the JSPs
are generated.
Thanks
Juan
Matt Raible wrote:
It should be fixed as long as you have to the proper annotations in
both POJOs. Have you examined User and Address to ensure you have
similar annotations?
http://static.appfuse.org/appfuse-data/appfuse-data-common/xref/index.html
Matt
On Wed, Jun 11, 2008 at 1:28 AM, Juan Heyns <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Hi guys
We are using a modular project with Struts2 & Hibernate. In our
core project
we are using annotated POJOs with @Embedded POJOs. When running
generate on the entity it does not include the fields of the
@Embeddable
POJO when creating the sample data.
Is this still an issue in Appfuse 2.0.2? I saw a note in the
changlog re to this
issue with a tag 2.0_RC1, should this not be fixed?
Regards
Juan