users@glassfish.java.net

Re: Glassfish V3 + Postgresql --> column does not exist error

From: <glassfish_at_javadesktop.org>
Date: Sun, 02 May 2010 10:44:15 PDT

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