Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Facing an issue for querying and error as “HSQL Database : ..java.sql.SQLException: Column not found: .. in statement

dhaval soni
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 2, 2013

I have created an activeobject query as below:

ao.find(IP.class, Query.select().where("user=? AND planStartTime >=? AND planEndTime<=?",u,datefieldl,datefieldl))

It gives me below error:

" Column not found: PLANSTARTTIME in statement [SELECT * FROM PUBLIC.AO_0371A8_IP WHERE user=? AND planStartTime>=? AND planEndTime<=?]"

My entity is look as below:

My entity is looks as below:

@Table("IP")
@Preload
    public interface IP extends Entity {

    @Accessor("issues")
    String getIssues();

@Mutator("issues")
void setIssues(String issues);

@Accessor("planStartTime")
Date getPlanStartTime();

@Mutator("planStartTime")
void setPlanStartTime(Date planStartTime);

@Accessor("planEndTime")
Date getPlanEndTime();

@Mutator("planEndTime")
void setPlanEndTime(Date planEndTime);

@Accessor("user")
String getUser();

@Mutator("user")
void setUser(String user);
}

I able to create entity and retrieve all entity (ao.find(..) without any 'where' condition) But it did not work when i give 'where' condition as shown in above stuff.. and gives me column not found error.


1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 2, 2013

The best way to check this is to open up the DB itself and check what is the column name (https://confluence.atlassian.com/display/JIRA/Running+SQL+commands+in+a+HSQL+database).

TAGS
AUG Leaders

Atlassian Community Events