Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot resolve column 'USERNAME' less

I develop Spring Framework MVC application. Also I use hibernate. Now I make simple POJO for User entity.

@Entity
@Table(name="USERS")
public class User{
    @Column(name = "USERNAME", nullable = false, unique = true)
    private String username;
}
  • I configure org.springframework.orm.hibernate4.LocalSessionFactoryBean

My code is working, but IDEA show me a next warning.

Cannot resolve column 'USERNAME' less... (Ctrl+F1) This inspection controls whether the Persistence ORM annotations are checked against configured Datasources

What do I do wrong?

like image 428
Daemon712 Avatar asked Sep 18 '15 21:09

Daemon712


1 Answers

Press Alt+Enter when cursor is on USERNAME to view popup with available actions. You'll see an option "Configure data sources" or something like that, choose it, and you'll see a window. You should add new data source based on your database type (PostgreSQL, MySQL, etc) and configure it with your connection params.

Helpful link: Managing Data Sources

like image 191
Everv0id Avatar answered Oct 16 '22 03:10

Everv0id