for future googlers!
finally i managed to solve the problem, i just had to put the annotations somewhere else in my code ,
@ElementCollection(targetClass = Days.class)
@CollectionTable(name = "days", joinColumns = @JoinColumn(name = "rule_id"))
@Column(name = "daysOfWeek", nullable = false)
@Enumerated(EnumType.STRING)
public Set<Days> getDays() {
return days;
}
as you can see i wrote the annotation code above and before the getter method(instead of placing it before the attribute declaration code) and problem solved, anyone who can explain me what causes this will be appreciated. thank you