liefke / org.fastnate

The Offline SQL Generator
Apache License 2.0
16 stars 11 forks source link

Can't override table of an @ElementCollection #61

Closed liefke closed 3 years ago

liefke commented 3 years ago

I have a mapped superclass with an @ElementCollection and I try to override the name of that table in a subclass with @AssociationOverride:

@MappedSuperclass
public class Superclass {
   @ElementCollection
   private List<String> values;
   ...
}

@Entity
@AssociationOverride(name="values", joinTable = @JoinTable(name = "AnotherTable"))
public class Subclass extends Superclass {
  ...
}

Fastnate currently ignores that override, while Hibernate accepts it (and even an additional @JoinColumn).

liefke commented 3 years ago

The @AssociationOverrides and @AttributeOverrides are now supported for @ElementCollection.