Hi all ,
i lost previous data froum app_user , user_role and role tables when i try
to create Person table which is described in the tutorials. Also it does not
create Person table too and it deletes the line " <mapping
class="com.mycompany.app.model.Person"/> " from hibernate.cfg.xml. What
could be the problem also is there a way to load initial data of app_user ,
user_role and role tables ?
---------------*-----------*-*-------------------------------------------
Here is my class :
package com.mycompany.app.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import org.appfuse.model.BaseObject;   

@Entity 
public class Person extends BaseObject {   
    private Long id;   
    private String firstName;   
    private String lastName;
        @Override
        public boolean equals(Object o) {
                // TODO Auto-generated method stub
                return false;
        }
        @Override
        public int hashCode() {
                // TODO Auto-generated method stub
                return 0;
        }
        @Override
        public String toString() {
                // TODO Auto-generated method stub
                return null;
        }
        public String getFirstName() {
                return firstName;
        }
        public void setFirstName(String firstName) {
                this.firstName = firstName;
        }
        
        @Id @GeneratedValue(strategy = GenerationType.AUTO)  
        public Long getId() {
                return id;
        }
        public void setId(Long id) {
                this.id = id;
        }
        public String getLastName() {
                return lastName;
        }
        public void setLastName(String lastName) {
                this.lastName = lastName;
        }   
  

}  

---------------*-----------*-*-------------------------------------------
here is hibernate-config file
<hibernate-configuration>
    <session-factory>
        <mapping class="org.appfuse.model.User"/>
        <mapping class="org.appfuse.model.Role"/>
        <mapping class="com.mycompany.app.model.Person"/> 
    </session-factory>
</hibernate-configuration>
-- 
View this message in context: 
http://www.nabble.com/Creating-Database-Table-tf3395449s2369.html#a9452845
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to