"Unresolved generator name" if no class is not annotated with @Entity [message #610620] |
Mon, 14 July 2008 09:58 |
Vadim Dmitriev Messages: 74 Registered: July 2009 |
Member |
|
|
Hi!
Here is an example class:
@MappedSuperclass
@Table(name="T_WEB_TEMP_APPL")
@SequenceGenerator(sequenceName="T_WEB_TEMP_APPL_SEQ", name = "appl_seq",
allocationSize = 1)
public class ApplicationBase implements Serializable {
@Id
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator = "appl_seq")
private Long id;
...
}
"appl_seq" in @GeneratedValue annotation is marked with error: Unresolved
generator name "appl_seq". If @Entity annotation is added - error goes
away.
I'm pretty new to all that JPA stuff, so it's entirely possible that @Id
or @GeneratedValue are not allowed within @MappedSuperclass. Though I
haven't found any indication of that nor on the net neither in the books.
I'll be grateful for clarification on this issue.
Thanks very much!
|
|
|
Powered by
FUDForum. Page generated in 0.01896 seconds