why do you have a property "id" in your entity, but not in your database?
also, you are missing the @Basic annotation here
@Column(name="entity_type_description")
public String getEntityTypeDescription()
{
return entityTypeDescription;
}
what error message do you get?
kr,
dominik
On Sun, May 2, 2010 at 7:44 PM, <glassfish_at_javadesktop.org> wrote:
> I have the same problem, and my tables and columns seem fine in postgresql.
>
> \d entity_types;
> Table "public.entity_types"
> Column | Type | Modifiers
> -------------------------+------------------------+-----------
> entity_type | character varying(4) | not null
> entity_type_description | character varying(255) |
> Indexes:
> "entity_types_pkey" PRIMARY KEY, btree (entity_type)
> Referenced by:
> TABLE "entities" CONSTRAINT "entities_entity_type_fkey" FOREIGN KEY (entity_type) REFERENCES entity_types(entity_type)
>
>
> @Entity
> @Table(name="entity_types")
> public class EntityTypeImpl implements RIEntityType
> {
> private String entityType;
> private String entityTypeDescription;
> private int id;
>
> public EntityTypeImpl(final String entityType, final String entityTypeDescription)
> {
> this.entityType = entityType;
> this.entityTypeDescription = entityTypeDescription;
> }
>
> public EntityTypeImpl()
> {
> }
>
> @Id
> @Column(name="entity_type")
> public String getEntityType()
> {
> return entityType;
> }
>
> public void setEntityType(final String type)
> {
> this.entityType = type;
> }
>
> @Column(name="entity_type_description")
> public String getEntityTypeDescription()
> {
> return entityTypeDescription;
> }
>
> public void setEntityTypeDescription(final String description)
> {
> this.entityTypeDescription = description;
> }
>
> public String toString()
> {
> return "EntityTypeImpl{" +
> "entityType='" + entityType + '\'' +
> ", entityTypeDescription='" + entityTypeDescription + '\'' +
> '}';
> }
> }
> [Message sent by forum member 'trentonadams']
>
> http://forums.java.net/jive/thread.jspa?messageID=399986
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
--
Dominik Dorn
http://dominikdorn.com
Tausche Deine Lernunterlagen auf http://www.studyguru.eu !