I'm trying to read all my data from PostgreSQL table and i am troubled to read an string array (in table: text[])
Code:
@Entity
@Table(name = "students")
public class BotUser {
...
@Column(name = "inventory")
@ElementCollection(targetClass = String.class, fetch = FetchType.EAGER)
private List<String> inventory;
...
}
Exception:
Hibernate: select inventory0_.BotUser_id as BotUser_1_0_0_, inventory0_.inventory as inventor2_0_0_ from BotUser_inventory inventory0_ where inventory0_.BotUser_id=?
org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
WARN: SQL Error: 0, SQLState: 42P01
org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
ERROR: ERROR: relation "botuser_inventory" does not exist
Position: 95
What should I do?