-->
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: Subclass field "contact" not found
PostPosted: Tue Dec 20, 2005 7:11 pm 
Newbie

Joined: Tue Dec 20, 2005 6:59 pm
Posts: 3
It look like the contact field inherited from ProprieteContact is not seen by Hibernate. Am I wrong ?

Hibernate version: 3.1 with Annotation 3.0 beta 7

Mapping documents:
in sub-class ProprieteContact
package org.rondeau.michel.contacts;

import javax.persistence.CascadeType;
import javax.persistence.EmbeddableSuperclass;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import org.hibernate.validator.NotNull;

@EmbeddableSuperclass
public abstract class ProprieteContact {
private Contact contact;

/**
*
*/
ProprieteContact() {
// pour les besoins d'hibernate
}
/**
* @param contact
*/
public ProprieteContact(Contact contact) {
if(contact == null)
throw new NullPointerException("contact");
this.contact = contact;
}

/**
* @return Returns the contact.
*/
@ManyToOne(cascade={CascadeType.ALL})
@JoinColumn(name="contact_fk")
@NotNull
@Id
public Contact getContact() {
return contact;
}

/**
* @param contact The contact to set.
*/
@SuppressWarnings("unused")
private void setContact(Contact contact) {
this.contact = contact;
}
}

in class DonneePersonnelle
package org.rondeau.michel.contacts;

import javax.persistence.Entity;
import javax.persistence.Id;

import org.hibernate.validator.NotNull;

@Entity
public class DonneePersonnelle extends ProprieteContact implements Comparable {

private String type;
private String valeur;

/**
*
*/
DonneePersonnelle() {
// pour les besoins d'hibernate
}

/**
*
*/
private DonneePersonnelle(Contact contact) {
super(contact);
}

/**
* @param contact
* @param type
* @param valeur
*/
public DonneePersonnelle(Contact contact, String type, String valeur) {
this(contact);
if(type == null)
throw new NullPointerException();
this.type = type;
this.valeur = valeur;
}

/**
* @return Returns the type.
*/
@NotNull
@Id
public String getType() {
return type;
}

/**
* @param type The type to set.
*/
@SuppressWarnings("unused")
private void setType(String type) {
if(type == null)
throw new NullPointerException("type");
this.type = type;
}

/**
* @return Returns the valeur.
*/
@NotNull
public String getValeur() {
return valeur;
}

/**
* @param valeur The valeur to set.
*/
public void setValeur(String valeur) {
if(valeur == null)
throw new NullPointerException("valeur");
this.valeur = valeur;
}

public int compareTo(Object o) {
int compare;
if (o instanceof DonneePersonnelle) {
DonneePersonnelle donnee = (DonneePersonnelle) o;
assert type != null && donnee.type != null;
assert valeur != null && donnee.valeur != null;

compare = (type.compareTo(donnee.type));
if(compare==0)
compare = valeur.compareTo(donnee.valeur);
return compare;
}
throw new ClassCastException();
}

/**
*
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("DonneePersonelle[type: ");
sb.append(type);
sb.append(", valeur: ");
sb.append(valeur);
sb.append(']');

return sb.toString();
}

/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object o){
if (this == o) return true;
if (!(o instanceof DonneePersonnelle)) return false;

DonneePersonnelle donnee = (DonneePersonnelle) o;
if(!getContact().equals(donnee.getContact())) return false;
if(!type.equals(donnee.type)) return false;
return (valeur == null ? donnee.valeur == null : valeur.equals(donnee.valeur));
}


/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
int result = getContact().hashCode();
result = 31 * result + getType().hashCode();
if(getValeur() != null)
result = 41 * result + getValeur().hashCode();
return result;
}
}


in class Contact
package org.rondeau.michel.contacts;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;

import org.hibernate.annotations.Index;
import org.hibernate.validator.Length;
import org.hibernate.validator.Min;
import org.hibernate.validator.NotNull;


@Entity
public class Contact {
private long idContact;

private String prefixe;

// un texte non nul d'au plus 30 caractères
private String nom;
private String prenom;
private String titre;

// private List<Coordonnee> coordonnees = new ArrayList<Coordonnee>();
// private Societe societe;
private Date anniversaire;

private List<DonneePersonnelle> donneesPersonnelles = new ArrayList<DonneePersonnelle>();
// private Hashtable<String, Adresse> adresses = new Hashtable<String, Adresse>();


/**
*
*/
private Contact() {
super();
}


/**
* @param prefixe
* @param nom
* @param prenom
* @param titre
* @param$societe
* @param anniversaire
*/
// public Contact(String prefixe, String nom, String prenom, String titre, Societe societe, Date anniversaire) {
public Contact(String prefixe, String nom, String prenom, String titre, Date anniversaire) {
this();
if(nom == null)
throw new NullPointerException("nom");


this.prefixe = prefixe;
this.nom = nom;
this.prenom = prenom;
this.titre = titre;
// this.societe = societe;
this.anniversaire = anniversaire;
}



// /**
// * @param coordonnees The coordonnees to set.
// */
// @SuppressWarnings("unused")
// private void setCoordonnees(List<Coordonnee> coordonnees) {
// this.coordonnees = coordonnees;
// }


/**
* @param donneesPersonnelles The donneesPersonnelles to set.
*/
@SuppressWarnings("unused")
private void setDonneesPersonnelles(List<DonneePersonnelle> donneesPersonnelles) {
this.donneesPersonnelles = donneesPersonnelles;
}


// /**
// * @return Returns the adresses.
// */
// public Hashtable<String, Adresse> getAdresses() {
// return adresses;
// }
// /**
// * @param adresses The adresses to set.
// */
// void setAdresses(Hashtable<String, Adresse> adresses) {
// this.adresses = adresses;
// }

/**
* @return Returns the anniversaire.
*/
public Date getAnniversaire() {
return anniversaire;
}
/**
* @param anniversaire The anniversaire to set.
*/
public void setAnniversaire(Date anniversaire) {
this.anniversaire = anniversaire;
}
// /**
// * @return Returns the coordonnees.
// */
// @OneToMany(mappedBy="contact")
// // @OrderBy("type, description")
// public List<Coordonnee> getCoordonnees() {
// return coordonnees;
// }

/**
* @return Returns the nom.
*/
@Length(max=30)
@NotNull
@Index(name="nom", columnNames={"nom", "prenom"})
public String getNom() {
return nom;
}
/**
* @param nom The nom to set.
*/
public void setNom(String nom) {
this.nom = nom;
}
/**
* @return Returns the prefixe.
*/
@Length(max=5)
public String getPrefixe() {
return prefixe;
}
/**
* @param prefixe The prefixe to set.
*/
public void setPrefixe(String prefixe) {
this.prefixe = prefixe;
}
/**
* @return Returns the prenom.
*/
@Length(max=30)
public String getPrenom() {
return prenom;
}
/**
* @param prenom The prenom to set.
*/
public void setPrenom(String prenom) {
this.prenom = prenom;
}
// /**
// * @return Returns the societe.
// */
// public Societe getSociete() {
// return societe;
// }
// /**
// * @param societe The societe to set.
// */
// public void setSociete(Societe societe) {
// this.societe = societe;
// }
/**
* @return Returns the titre.
*/
@Length(max=30)
public String getTitre() {
return titre;
}
/**
* @param titre The titre to set.
*/
public void setTitre(String titre) {
this.titre = titre;
}
/**
* @return Returns the idContact.
*/
@Id @Min(1)
public long getIdContact() {
return idContact;
}
/**
* @param idContact The idContact to set.
*/
@SuppressWarnings("unused")
private void setIdContact(long idContact) {
this.idContact = idContact;
}
/**
* @return Returns the donneesPersonnelles.
*/
@OneToMany(mappedBy="contact")
// @OrderBy("type, valeur")
public List<DonneePersonnelle> getDonneesPersonnelles() {
return donneesPersonnelles;
}
/**
*
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("Contact[nom: ");
sb.append(nom);
sb.append(", prenom: ");
sb.append(prenom);
sb.append(", titre: ");
sb.append(titre);
sb.append(", coordonnees: ");
// sb.append(coordonnees);
// sb.append(", anniversaire: ");
sb.append(anniversaire);
sb.append(", donneesPersonnelles: ");
sb.append(donneesPersonnelles);
sb.append(']');

return sb.toString();
}
}



Code between sessionFactory.openSession() and session.close():
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
try {
Contact contact = new Contact("M.", "Rondeau", "Michel", "informaticien", null);
contact.setAnniversaire((new GregorianCalendar(1967, 5,16)).getTime());
// contact.getCoordonnees().add(new Coordonnee(contact, TypeCoordonnees.telephone, "bureau", "514-228-8800 #2048"));
contact.getDonneesPersonnelles().add(new DonneePersonnelle(contact, "Conjoint", "Nathalie"));
contact.getDonneesPersonnelles().add(new DonneePersonnelle(contact, "Enfants", "Emmanuel, Gabriel, Myriam"));

logger.debug(contact);
session.save(contact);

session.getTransaction().commit();
} catch(RuntimeException e) {
session.getTransaction().rollback();
throw e;
}

Full stack trace of any exception that occurs:
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.rondeau.michel.contacts.db.HibernateUtil.<clinit>(HibernateUtil.java:48)
at org.rondeau.michel.contacts.test.TestContact.createAndStoreContact(TestContact.java:41)
at org.rondeau.michel.contacts.test.TestContact.main(TestContact.java:23)
Caused by: org.hibernate.MappingException: property not found: contact on entity org.rondeau.michel.contacts.DonneePersonnelle
at org.hibernate.mapping.PersistentClass.getProperty(PersistentClass.java:352)
at org.hibernate.mapping.PersistentClass.getProperty(PersistentClass.java:357)
at org.hibernate.cfg.annotations.TableBinder.bindFk(TableBinder.java:159)
at org.hibernate.cfg.annotations.CollectionBinder.bindCollectionSecondPass(CollectionBinder.java:860)
at org.hibernate.cfg.annotations.CollectionBinder.bindOneToManySecondPass(CollectionBinder.java:475)
at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:406)
at org.hibernate.cfg.annotations.CollectionBinder$1.secondPass(CollectionBinder.java:380)
at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:35)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1031)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:227)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1146)
at org.rondeau.michel.contacts.db.HibernateUtil.<clinit>(HibernateUtil.java:20)
... 2 more

Name and version of the database you are using:
hsqldb 1.8.0.2
The generated SQL (show_sql=true):
N/A
Debug level Hibernate log excerpt:
*** configurationOptionStr=null
** End of LogManager static initializer
log4j:INFO Creating new logger [org.rondeau.michel.contacts.test.TestContact] in repository [default].
log4j:INFO Creating new logger [org.hibernate.cfg.Configuration] in repository [default].
log4j:INFO Creating new logger [org.hibernate.cfg.AnnotationConfiguration] in repository [default].
log4j:INFO Creating new logger [org.hibernate.cfg.SettingsFactory] in repository [default].
log4j:INFO Creating new logger [org.hibernate.util.XMLHelper] in repository [default].
log4j:INFO Creating new logger [org.hibernate.util.DTDEntityResolver] in repository [default].
log4j:INFO Creating new logger [org.hibernate.cfg.Environment] in repository [default].
INFO - Hibernate 3.1
log4j:INFO Creating new logger [org.hibernate.util.ConfigHelper] in repository [default].
INFO - hibernate.properties not found
INFO - using CGLIB reflection optimizer
INFO - using JDK 1.4 java.sql.Timestamp handling
log4j:INFO Creating new logger [org.hibernate.event.def.AbstractReassociateEventListener] in repository [default].
log4j:INFO Creating new logger [org.hibernate.event.def.AbstractLockUpgradeEventListener] in repository [default].
log4j:INFO Creating new logger [org.hibernate.event.def.DefaultLoadEventListener] in repository [default].
log4j:INFO Creating new logger [org.hibernate.event.def.AbstractSaveEventListener] in repository [default].
log4j:INFO Creating new logger [org.hibernate.event.def.DefaultSaveOrUpdateEventListener] in repository [default].
log4j:INFO Creating new logger [org.hibernate.event.def.DefaultMergeEventListener] in repository [default].
log4j:INFO Creating new logger [org.hibernate.event.def.DefaultPersistEventListener] in repository [default].
log4j:INFO Creating new logger [org.hibernate.event.def.DefaultReplicateEventListener] in repository [default].
log4j:INFO Creating new logger [org.hibernate.event.def.DefaultDeleteEventListener] in repository [default].
log4j:INFO Creating new logger [org.hibernate.event.def.AbstractFlushingEventListener] in repository [default].
log4j:INFO Creating new logger [org.hibernate.event.def.DefaultAutoFlushEventListener] in repository [default].
log4j:INFO Creating new logger [org.hibernate.event.def.DefaultDirtyCheckEventListener] in repository [default].
log4j:INFO Creating new logger [org.hibernate.event.def.DefaultEvictEventListener] in repository [default].
log4j:INFO Creating new logger [org.hibernate.event.def.DefaultRefreshEventListener] in repository [default].
log4j:INFO Creating new logger [org.hibernate.event.def.DefaultFlushEntityEventListener] in repository [default].
log4j:INFO Creating new logger [org.hibernate.event.def.DefaultInitializeCollectionEventListener] in repository [default].
INFO - Mapping package org.rondeau.michel.contacts
log4j:INFO Creating new logger [org.hibernate.cfg.Mappings] in repository [default].
log4j:INFO Creating new logger [org.hibernate.cfg.ExtendedMappings] in repository [default].
log4j:INFO Creating new logger [org.hibernate.cfg.AnnotationBinder] in repository [default].
log4j:INFO Creating new logger [org.hibernate.util.ReflectHelper] in repository [default].
log4j:INFO Creating new logger [org.hibernate.property.BasicPropertyAccessor] in repository [default].
WARN - Package not found or wo package-info.java: org.rondeau.michel.contacts
INFO - configuring from resource: /hibernate.cfg.xml
INFO - Configuration resource: /hibernate.cfg.xml
DEBUG - trying to locate http://hibernate.sourceforge.net/hibern ... on-3.0.dtd in classpath under org/hibernate/
DEBUG - found http://hibernate.sourceforge.net/hibern ... on-3.0.dtd in classpath
DEBUG - connection.driver_class=org.hsqldb.jdbcDriver
DEBUG - connection.url=jdbc:hsqldb:hsql://localhost
DEBUG - connection.username=sa
DEBUG - connection.password=
DEBUG - connection.pool_size=1
DEBUG - dialect=org.hibernate.dialect.HSQLDialect
DEBUG - current_session_context_class=thread
DEBUG - cache.provider_class=org.hibernate.cache.NoCacheProvider
DEBUG - show_sql=true
DEBUG - hbm2ddl.auto=create
INFO - Configured SessionFactory: null
DEBUG - properties: {java.vendor=Sun Microsystems Inc., show_sql=true, hibernate.connection.url=jdbc:hsqldb:hsql://localhost, sun.management.compiler=HotSpot Client Compiler, os.name=Windows 2000, hbm2ddl.auto=create, sun.boot.class.path=C:\Program Files\Java\jdk1.5.0_03\jre\lib\rt.jar;C:\Program Files\Java\jdk1.5.0_03\jre\lib\i18n.jar;C:\Program Files\Java\jdk1.5.0_03\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.5.0_03\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.5.0_03\jre\lib\jce.jar;C:\Program Files\Java\jdk1.5.0_03\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.5.0_03\jre\classes, hibernate.current_session_context_class=thread, sun.desktop=windows, java.vm.specification.vendor=Sun Microsystems Inc., java.runtime.version=1.5.0_03-b07, hibernate.cache.provider_class=org.hibernate.cache.NoCacheProvider, user.name=rondmic, connection.driver_class=org.hsqldb.jdbcDriver, current_session_context_class=thread, user.language=fr, sun.boot.library.path=C:\Program Files\Java\jdk1.5.0_03\jre\bin, dialect=org.hibernate.dialect.HSQLDialect, java.version=1.5.0_03, user.timezone=, sun.arch.data.model=32, java.endorsed.dirs=C:\Program Files\Java\jdk1.5.0_03\jre\lib\endorsed, sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86, sun.jnu.encoding=Cp1252, file.encoding.pkg=sun.io, file.separator=\, java.specification.name=Java Platform API Specification, hibernate.cglib.use_reflection_optimizer=true, java.class.version=49.0, user.country=CA, connection.url=jdbc:hsqldb:hsql://localhost, java.home=C:\Program Files\Java\jdk1.5.0_03\jre, java.vm.info=mixed mode, os.version=5.0, path.separator=;, connection.password=, java.vm.version=1.5.0_03-b07, hibernate.connection.password=, user.variant=, java.awt.printerjob=sun.awt.windows.WPrinterJob, sun.io.unicode.encoding=UnicodeLittle, awt.toolkit=sun.awt.windows.WToolkit, hibernate.connection.username=sa, user.home=C:\Documents and Settings\rondmic, java.specification.vendor=Sun Microsystems Inc., hibernate.hbm2ddl.auto=create, java.library.path=C:\Program Files\Java\jdk1.5.0_03\bin;.;C:\WINNT\system32;C:\WINNT;C:\Program Files\Java\jdk1.5.0_03\jre\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Programmer's File Editor;C:\Program Files\apache-ant-1.6.2\bin;c:\j2me\j2me_cldc\bin;C:\J2ME\midp2.0fcs\bin;C:\J2ME\Tools\bin;C:\Program Files\Druide\Antidote\Antidote;C:\PROGRA~1\Druide\Antidote\Antidote, java.vendor.url=http://java.sun.com/, hibernate.connection.driver_class=org.hsqldb.jdbcDriver, connection.username=sa, java.vm.vendor=Sun Microsystems Inc., hibernate.dialect=org.hibernate.dialect.HSQLDialect, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, java.class.path=C:\Documents and Settings\rondmic\workspace\GestionContacts;C:\Documents and Settings\rondmic\workspace\GestionContacts\lib\ejb3-persistence.jar;C:\Documents and Settings\rondmic\workspace\GestionContacts\lib\hibernate3.jar;C:\Documents and Settings\rondmic\workspace\GestionContacts\lib\hibernate-annotations.jar;C:\Documents and Settings\rondmic\workspace\GestionContacts\lib\hsqldb.jar;C:\Documents and Settings\rondmic\workspace\GestionContacts\lib\log4j-1.3alpha-6.jar;C:\Documents and Settings\rondmic\workspace\GestionContacts\lib\lucene-1.4.3.jar;C:\Documents and Settings\rondmic\workspace\GestionContacts\lib\ant-antlr-1.6.5.jar;C:\Documents and Settings\rondmic\workspace\GestionContacts\lib\asm.jar;C:\Documents and Settings\rondmic\workspace\GestionContacts\lib\asm-attrs.jar;C:\Documents and Settings\rondmic\workspace\GestionContacts\lib\commons-collections-2.1.1.jar;C:\Documents and Settings\rondmic\workspace\GestionContacts\lib\commons-logging-1.0.4.jar;C:\Documents and Settings\rondmic\workspace\GestionContacts\lib\dom4j-1.6.1.jar;C:\Documents and Settings\rondmic\workspace\GestionContacts\lib\ehcache-1.1.jar;C:\Documents and Settings\rondmic\workspace\GestionContacts\lib\jta.jar;C:\Documents and Settings\rondmic\workspace\GestionContacts\lib\cglib-2.1.3.jar, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.0, sun.cpu.endian=little, sun.os.patch.level=Service Pack 4, connection.pool_size=1, java.io.tmpdir=C:\DOCUME~1\rondmic\LOCALS~1\Temp\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, os.arch=x86, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.ext.dirs=C:\Program Files\Java\jdk1.5.0_03\jre\lib\ext, user.dir=C:\Documents and Settings\rondmic\workspace\GestionContacts, line.separator=
, java.vm.name=Java HotSpot(TM) Client VM, cache.provider_class=org.hibernate.cache.NoCacheProvider, file.encoding=Cp1252, java.specification.version=1.5, hibernate.show_sql=true, hibernate.connection.pool_size=1}
DEBUG - Preparing to build session factory with filters : {}
DEBUG - Execute first pass mapping processing
DEBUG - Process hbm files
DEBUG - Process annotated classes
INFO - Binding entity from annotated class: java.lang.Class
log4j:INFO Creating new logger [org.hibernate.cfg.annotations.QueryBinder] in repository [default].
log4j:INFO Creating new logger [org.hibernate.cfg.Ejb3Column] in repository [default].
DEBUG - Binding column TYPE unique false
log4j:INFO Creating new logger [org.hibernate.cfg.annotations.EntityBinder] in repository [default].
DEBUG - Import with entity name=Contact
log4j:INFO Creating new logger [org.hibernate.cfg.annotations.TableBinder] in repository [default].
INFO - Bind entity org.rondeau.michel.contacts.Contact on table Contact
DEBUG - Processing org.rondeau.michel.contacts.Contact per property access
DEBUG - Processing annotations of org.rondeau.michel.contacts.Contact.idContact
DEBUG - Binding column idContact unique false
DEBUG - idContact is an id
log4j:INFO Creating new logger [org.hibernate.cfg.annotations.SimpleValueBinder] in repository [default].
DEBUG - building SimpleValue for idContact
log4j:INFO Creating new logger [org.hibernate.cfg.annotations.PropertyBinder] in repository [default].
DEBUG - Building property idContact
DEBUG - Cascading idContact with null
DEBUG - Bind @EmbeddedId on idContact
DEBUG - Processing annotations of org.rondeau.michel.contacts.Contact.donneesPersonnelles
DEBUG - Binding column null unique false
DEBUG - Binding column donneesPersonnelles unique false
DEBUG - Binding column null unique false
log4j:INFO Creating new logger [org.hibernate.cfg.annotations.CollectionBinder] in repository [default].
DEBUG - Binding column null unique false
DEBUG - Binding column null unique false
DEBUG - Collection role: org.rondeau.michel.contacts.Contact.donneesPersonnelles
log4j:INFO Creating new logger [org.hibernate.cfg.CollectionSecondPass] in repository [default].
DEBUG - Building property donneesPersonnelles
DEBUG - Cascading donneesPersonnelles with none
DEBUG - Processing annotations of org.rondeau.michel.contacts.Contact.anniversaire
DEBUG - Binding column anniversaire unique false
DEBUG - binding property anniversaire with lazy=false
DEBUG - building SimpleValue for anniversaire
DEBUG - Building property anniversaire
DEBUG - Cascading anniversaire with null
DEBUG - Processing annotations of org.rondeau.michel.contacts.Contact.nom
DEBUG - Binding column nom unique false
DEBUG - binding property nom with lazy=false
DEBUG - building SimpleValue for nom
DEBUG - Building property nom
DEBUG - Cascading nom with null
DEBUG - Processing annotations of org.rondeau.michel.contacts.Contact.prefixe
DEBUG - Binding column prefixe unique false
DEBUG - binding property prefixe with lazy=false
DEBUG - building SimpleValue for prefixe
DEBUG - Building property prefixe
DEBUG - Cascading prefixe with null
DEBUG - Processing annotations of org.rondeau.michel.contacts.Contact.prenom
DEBUG - Binding column prenom unique false
DEBUG - binding property prenom with lazy=false
DEBUG - building SimpleValue for prenom
DEBUG - Building property prenom
DEBUG - Cascading prenom with null
DEBUG - Processing annotations of org.rondeau.michel.contacts.Contact.titre
DEBUG - Binding column titre unique false
DEBUG - binding property titre with lazy=false
DEBUG - building SimpleValue for titre
DEBUG - Building property titre
DEBUG - Cascading titre with null
log4j:INFO Creating new logger [org.hibernate.validator.ClassValidator] in repository [default].
DEBUG - ResourceBundle ValidatorMessages not found. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
INFO - Binding entity from annotated class: java.lang.Class
DEBUG - Binding column TYPE unique false
DEBUG - Import with entity name=Coordonnee
INFO - Bind entity org.rondeau.michel.contacts.Coordonnee on table Coordonnee
DEBUG - Processing org.rondeau.michel.contacts.Coordonnee per property access
DEBUG - Processing org.rondeau.michel.contacts.Coordonnee per property access
DEBUG - Processing annotations of org.rondeau.michel.contacts.Coordonnee.description
DEBUG - Binding column description unique false
DEBUG - description is an id
DEBUG - building SimpleValue for description
DEBUG - Building property description
DEBUG - Cascading description with null
DEBUG - Bind @EmbeddedId on description
DEBUG - Processing annotations of org.rondeau.michel.contacts.Coordonnee.type
DEBUG - Binding column type unique false
DEBUG - type is an id
DEBUG - building SimpleValue for type
DEBUG - Building property type
DEBUG - Cascading type with null
DEBUG - Bind @EmbeddedId on type
DEBUG - Processing annotations of org.rondeau.michel.contacts.Coordonnee.contact
DEBUG - Binding column contact_fk unique false
DEBUG - Binding column contact unique false
DEBUG - contact is an id
DEBUG - building SimpleValue for contact
DEBUG - Building property contact
DEBUG - Cascading contact with null
DEBUG - Bind @EmbeddedId on contact
DEBUG - Processing annotations of org.rondeau.michel.contacts.Coordonnee.numero
DEBUG - Binding column numero unique false
DEBUG - binding property numero with lazy=false
DEBUG - building SimpleValue for numero
DEBUG - Building property numero
DEBUG - Cascading numero with null
DEBUG - ResourceBundle ValidatorMessages not found. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
INFO - Binding entity from annotated class: java.lang.Class
DEBUG - Binding column TYPE unique false
DEBUG - Import with entity name=DonneePersonnelle
INFO - Bind entity org.rondeau.michel.contacts.DonneePersonnelle on table DonneePersonnelle
DEBUG - Processing org.rondeau.michel.contacts.DonneePersonnelle per property access
DEBUG - Processing org.rondeau.michel.contacts.DonneePersonnelle per property access
DEBUG - Processing annotations of org.rondeau.michel.contacts.DonneePersonnelle.type
DEBUG - Binding column type unique false
DEBUG - type is an id
DEBUG - building SimpleValue for type
DEBUG - Building property type
DEBUG - Cascading type with null
DEBUG - Bind @EmbeddedId on type
DEBUG - Processing annotations of org.rondeau.michel.contacts.DonneePersonnelle.contact
DEBUG - Binding column contact_fk unique false
DEBUG - Binding column contact unique false
DEBUG - contact is an id
DEBUG - building SimpleValue for contact
DEBUG - Building property contact
DEBUG - Cascading contact with null
DEBUG - Bind @EmbeddedId on contact
DEBUG - Processing annotations of org.rondeau.michel.contacts.DonneePersonnelle.valeur
DEBUG - Binding column valeur unique false
DEBUG - binding property valeur with lazy=false
DEBUG - building SimpleValue for valeur
DEBUG - Building property valeur
DEBUG - Cascading valeur with null
DEBUG - ResourceBundle ValidatorMessages not found. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
DEBUG - processing manytoone fk mappings
INFO - processing extends queue
INFO - processing collection mappings
DEBUG - Second pass for collection: org.rondeau.michel.contacts.Contact.donneesPersonnelles
DEBUG - Binding a OneToMany: org.rondeau.michel.contacts.Contact.donneesPersonnelles through a foreign key
INFO - Mapping collection: org.rondeau.michel.contacts.Contact.donneesPersonnelles -> DonneePersonnelle
DEBUG - Retrieving property org.rondeau.michel.contacts.DonneePersonnelle.contact
Initial SessionFactory creation failed.org.hibernate.MappingException: property not found: contact on entity org.rondeau.michel.contacts.DonneePersonnelle


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 21, 2005 8:29 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
@ManyToOne and @Id cannot be applied on the same element

_________________
Emmanuel


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.