Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Hibernate @GenericGenerator is not recognized by @GeneratedValue
Hibernate @GenericGenerator is not recognized by @GeneratedValue [message #434928] Fri, 11 July 2008 03:08 Go to next message
Eclipse UserFriend
Originally posted by: fast40x-a.yahoo.com

I use a hibernate @GenericGenerator(name="MySeq" ...) to setup a generator
and use it with @GeneratedValue(generator = "MySeq"). The application
runs fine, but Eclipse reports an error of 'Unresolved generator name
"MySeq"'. Is there either a way to disable this error check or to
configure the project so that it recognized the "MySeq" generator?
Re: Hibernate @GenericGenerator is not recognized by @GeneratedValue [message #434931 is a reply to message #434928] Tue, 15 July 2008 13:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fast40x-a.yahoo.com

Ed Sunn wrote:

> I use a hibernate @GenericGenerator(name="MySeq" ...) to setup a generator
> and use it with @GeneratedValue(generator = "MySeq"). The application
> runs fine, but Eclipse reports an error of 'Unresolved generator name
> "MySeq"'.

I was wondering, if there is no way to turn off this check in Dali, and
there is no way to configure the project so Dali can recognize the
hibernate sequence, then maybe there is a way I can trick Dali by setting
up a JPA generator, but then somehow override that JPA generator with a
hibernate one, maybe just at runtime? If so, does anybody have an idea
how?

The reason this is an issue is that since Dali doesn't recognize the
hibernate generator, it mistakenly puts the red and white error marks in
Eclipse's Project Explorer. This is normally a helpful visual clue
whether the project is error free or not, but with Dali reporting this
false error, the visual clue isn't helpful.

Even if Dali doesn't want to work well with Hibernate, it still seems that
it should allow users to configure which error checks dali should perform.
Re: Hibernate @GenericGenerator is not recognized by @GeneratedValue [message #434934 is a reply to message #434931] Wed, 16 July 2008 14:29 Go to previous message
Karen Butzke is currently offline Karen ButzkeFriend
Messages: 220
Registered: July 2009
Senior Member
Hi Ed,

The ultimate solution to this problem is to have a Hibernate platform that
supports the GenericGenerator. This would allow it to be part of the
namespace of possibly generators. Another possibility is to allow
disabling of validation. In this case, it's not that we're being
Hibernate unfriendly, there just isn't a Hibernate platform and this error
is correct for the generic JPA case.

Here is a JBoss IDE bug for supporting the Hibernate platform extension of
Dali that they are currently working on. You could mention this use case
there so they are aware of it.

https://jira.jboss.org:8443/jira/browse/JBIDE-2244?page=com. atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

thanks,
Karen
Re: Hibernate @GenericGenerator is not recognized by @GeneratedValue [message #610627 is a reply to message #434928] Tue, 15 July 2008 13:46 Go to previous message
Eclipse UserFriend
Originally posted by: fast40x-a.yahoo.com

Ed Sunn wrote:

> I use a hibernate @GenericGenerator(name="MySeq" ...) to setup a generator
> and use it with @GeneratedValue(generator = "MySeq"). The application
> runs fine, but Eclipse reports an error of 'Unresolved generator name
> "MySeq"'.

I was wondering, if there is no way to turn off this check in Dali, and
there is no way to configure the project so Dali can recognize the
hibernate sequence, then maybe there is a way I can trick Dali by setting
up a JPA generator, but then somehow override that JPA generator with a
hibernate one, maybe just at runtime? If so, does anybody have an idea
how?

The reason this is an issue is that since Dali doesn't recognize the
hibernate generator, it mistakenly puts the red and white error marks in
Eclipse's Project Explorer. This is normally a helpful visual clue
whether the project is error free or not, but with Dali reporting this
false error, the visual clue isn't helpful.

Even if Dali doesn't want to work well with Hibernate, it still seems that
it should allow users to configure which error checks dali should perform.
Re: Hibernate @GenericGenerator is not recognized by @GeneratedValue [message #611115 is a reply to message #434931] Wed, 16 July 2008 14:29 Go to previous message
Karen Butzke is currently offline Karen ButzkeFriend
Messages: 220
Registered: July 2009
Senior Member
Hi Ed,

The ultimate solution to this problem is to have a Hibernate platform that
supports the GenericGenerator. This would allow it to be part of the
namespace of possibly generators. Another possibility is to allow
disabling of validation. In this case, it's not that we're being
Hibernate unfriendly, there just isn't a Hibernate platform and this error
is correct for the generic JPA case.

Here is a JBoss IDE bug for supporting the Hibernate platform extension of
Dali that they are currently working on. You could mention this use case
there so they are aware of it.

https://jira.jboss.org:8443/jira/browse/JBIDE-2244?page=com. atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

thanks,
Karen
Previous Topic:persistence.xml and orm.xml are not copied to build folder
Next Topic:"Unresolved generator name" if no class is not annotated with @Entity
Goto Forum:
  


Current Time: Wed Nov 26 10:41:39 GMT 2014

Powered by FUDForum. Page generated in 0.10742 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software