[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: QuerySyntaxException Class is not mapped JBOSS 4.2.2GA E

July Pyrra do-not-reply at jboss.com
Tue May 27 10:47:09 EDT 2008


As I said, I'm working with EJB3 so it shouldn't have to deal with the persistence.xml or hibernate.cfg.xml

persistence.xml

  | <?xml version="1.0" encoding="UTF-8"?>
  | <persistence>
  | 
  | 	<persistence-unit name="App">
  | 		<provider>org.hibernate.ejb.HibernatePersistence</provider>				
  | 		<jta-data-source>java:/applids</jta-data-source>
  | 	</persistence-unit>
  | 	
  | </persistence>
  | 

Entity Account

  | package datamodel.DAO;
  | 
  | // Generated 13-may-2008 17:41:43 by Hibernate Tools 3.1.0.beta5
  | 
  | import javax.persistence.Column;
  | import javax.persistence.Entity;
  | import javax.persistence.FetchType;
  | import javax.persistence.GeneratedValue;
  | import javax.persistence.Id;
  | import javax.persistence.JoinColumn;
  | import javax.persistence.ManyToOne;
  | import javax.persistence.Table;
  | 
  | /**
  |  * Account generated by hbm2java
  |  */
  | @Entity
  | @Table(name = "account", catalog = "appli", uniqueConstraints = {})
  | public class Account implements java.io.Serializable {
  | 
  | 	// Fields    
  | 
  | 	private int idAccount;
  | 
  | 	private SystemUser systemUser;
  | 
  | 	private String uid;
  | 
  | 	private String pwd;
  | 
  | 	private Boolean status;
  | 
  | 	// Constructors
  | 
  | 	/** default constructor */
  | 	public Account() {
  | 	}
  | 
  | 	/** minimal constructor */
  | 	public Account(int idAccount, SystemUser systemUser) {
  | 		this.idAccount = idAccount;
  | 		this.systemUser = systemUser;
  | 	}
  | 
  | 	/** full constructor */
  | 	public Account(int idAccount, SystemUser systemUser, String uid,
  | 			String pwd, Boolean status) {
  | 		this.idAccount = idAccount;
  | 		this.systemUser = systemUser;
  | 		this.uid = uid;
  | 		this.pwd = pwd;
  | 		this.status = status;
  | 	}
  | 
  | 	// Property accessors
  | 	@Id @GeneratedValue
  | 	@Column(name = "idAccount", unique = true, nullable = false, insertable = true, updatable = true)
  | 	public int getIdAccount() {
  | 		return this.idAccount;
  | 	}
  | 
  | 	public void setIdAccount(int idAccount) {
  | 		this.idAccount = idAccount;
  | 	}
  | 
  | 	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
  | 	@JoinColumn(name = "idSystem_User", unique = false, nullable = false, insertable = true, updatable = true)
  | 	public SystemUser getSystemUser() {
  | 		return this.systemUser;
  | 	}
  | 
  | 	public void setSystemUser(SystemUser systemUser) {
  | 		this.systemUser = systemUser;
  | 	}
  | 
  | 	@Column(name = "uid", unique = false, nullable = true, insertable = true, updatable = true, length = 20)
  | 	public String getUid() {
  | 		return this.uid;
  | 	}
  | 
  | 	public void setUid(String uid) {
  | 		this.uid = uid;
  | 	}
  | 
  | 	@Column(name = "pwd", unique = false, nullable = true, insertable = true, updatable = true, length = 65535)
  | 	public String getPwd() {
  | 		return this.pwd;
  | 	}
  | 
  | 	public void setPwd(String pwd) {
  | 		this.pwd = pwd;
  | 	}
  | 
  | 	@Column(name = "status", unique = false, nullable = true, insertable = true, updatable = true)
  | 	public Boolean getStatus() {
  | 		return this.status;
  | 	}
  | 
  | 	public void setStatus(Boolean status) {
  | 		this.status = status;
  | 	}
  | 
  | }
  | 



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153649#4153649

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153649



More information about the jboss-user mailing list