package org.dynamicfinder.test._entity;

import java.io.Serializable;

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

/**
 * @author xsalefter (xsalefter[at]gmail.com)
 */
@Entity
@Table(name="city")
public class City implements Serializable {

	private static final long serialVersionUID = -4022018627107616725L;

	@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="city_id")
	private Long id;
	
	@Column(name="city_name", nullable=false, length=100)
	private String name;
	
	public City() {}
	
	public City(String name) {
		this.name = name;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
}

package org.dynamicfinder.test._entity;

import java.io.Serializable;

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

/**
 * @author xsalefter (xsalefter[at]gmail.com)
 */
@Entity(name="CityEntity")
@Table(name="city")
public class City implements Serializable {

	private static final long serialVersionUID = -4022018627107616725L;

	@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="city_id")
	private Long id;
	
	@Column(name="city_name", nullable=false, length=100)
	private String name;
	
	public City() {}
	
	public City(String name) {
		this.name = name;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
}

Add name="CityEntity" in @Entity annotation.