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;
}
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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With