Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » "Unresolved generator name" if no class is not annotated with @Entity
"Unresolved generator name" if no class is not annotated with @Entity [message #610620] Mon, 14 July 2008 05:58
Vadim Dmitriev is currently offline 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!
Previous Topic:Hibernate @GenericGenerator is not recognized by @GeneratedValue
Next Topic:persistence.xml and orm.xml are not copied to build folder
Goto Forum:
  


Current Time: Tue Jul 29 00:45:03 EDT 2014

Powered by FUDForum. Page generated in 0.02088 seconds