Todd Nine
unread,Sep 13, 2009, 9:55:14 PM9/13/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google App Engine
Hi all,
I've used hibernate for a while, and I'm having a bit of trouble
switching to JDO. I have several entities that all entities will
share. Rather than a parent table, I'd prefer these columns be
embedded directly in each entity. As such, I've defined my abstract
entity and child entity in the classes below. However, whenever I try
to run my unit tests or the jetty environment, I always receive the
following error.
org.datanucleus.exceptions.NoPersistenceInformationException: The
class "com.onwebconsulting.inventory.model.Part" is required to be
persistable yet no Meta-Data/Annotations can be found for this class.
Please check that the Meta-Data/annotations is defined in a valid file
location.]]
According to my Eclipse console I have 1 class that has been
Enhanced. Any ideas what I'm doing wrong?
DataNucleus Enhancer completed with success for 1 classes. Timings :
input=268 ms, enhance=51 ms, total=319 ms. Consult the log for full
details
@Inheritance(strategy = InheritanceStrategy.NEW_TABLE)
public class Part extends Auditable{
@Persistent
private String name;
@Persistent
private String description;
@Persistent
private String partNumber;
@Persistent
private long quantity;
@Persistent
private String manuacturersPartNumber;
@Persistent
private String manufacturerName;
@Persistent
private String suppliersPartNumber;
@Persistent
private String supplierName;
@Persistent
private String supplierWebsite;
@Persistent
private float salePrice;
@Persistent
private float supplierPrice;
... Getters and Setters
}
@PersistenceCapable(identityType = IdentityType.APPLICATION)
@Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
public abstract class Auditable {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key id;
@Persistent
private Date createDate;
@Persistent
private Date updatedDate;
@Persistent
private long version;
public Key getId() {
return id;
}
public Date getCreateDate() {
return createDate;
}
public Date getUpdatedDate() {
return updatedDate;
}
public long getVersion(){
return version;
}
}