Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Can't find AccessType?
Can't find AccessType? [message #433523] Fri, 10 February 2006 18:37 Go to next message
Bryan Hunt is currently offline Bryan HuntFriend
Messages: 366
Registered: July 2009
Senior Member
I'm trying Dali for the first time, and I've run into a problem where
import javax.persistence.AccessType cannot be resolved. Searching
around, it appears that the class has been removed from the jboss
container. Is there a download coming that fixes this, or is there a
workaround? I also tried glassfish, but had the same problem.

Bryan
Re: Can't find AccessType? [message #433524 is a reply to message #433523] Fri, 10 February 2006 21:59 Go to previous messageGo to next message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
> I'm trying Dali for the first time, and I've run into a problem where
> import javax.persistence.AccessType cannot be resolved. Searching
> around, it appears that the class has been removed from the jboss
> container. Is there a download coming that fixes this, or is there a
> workaround? I also tried glassfish, but had the same problem.

The AccessType annotation was removed in the Proposed Final Draft
(19 Dec 2005) of JSR220. The entity's access type is now implied by
where you put your mapping annotations: If you annotate the entity's
fields, the access type is FIELD; if you annotate the entity's
properties (i.e. the getter methods), the access type is PROPERTY.

The current Dali download does not support the PFD; but that is what we
are currently working towards. See http://wiki.eclipse.org/index.php/Dali_Project

Brian
Re: Can't find AccessType? [message #433542 is a reply to message #433524] Wed, 22 February 2006 14:09 Go to previous messageGo to next message
Barry Kaplan is currently offline Barry KaplanFriend
Messages: 230
Registered: July 2009
Senior Member
Brian Vosburgh wrote:
>
> The AccessType annotation was removed in the Proposed Final Draft
> (19 Dec 2005) of JSR220. The entity's access type is now implied by
> where you put your mapping annotations: If you annotate the entity's
> fields, the access type is FIELD; if you annotate the entity's
> properties (i.e. the getter methods), the access type is PROPERTY.

What is the default when neither is annotated? (Hibernate EJB3 seems to
use FIELD, but is that standard?)

-barry
Re: Can't find AccessType? [message #433544 is a reply to message #433542] Wed, 22 February 2006 14:51 Go to previous message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
Barry Kaplan wrote:
> Brian Vosburgh wrote:
>>
>> The AccessType annotation was removed in the Proposed Final Draft
>> (19 Dec 2005) of JSR220. The entity's access type is now implied by
>> where you put your mapping annotations: If you annotate the entity's
>> fields, the access type is FIELD; if you annotate the entity's
>> properties (i.e. the getter methods), the access type is PROPERTY.
>
> What is the default when neither is annotated? (Hibernate EJB3 seems to
> use FIELD, but is that standard?)
>
> -barry

According to the spec, one or the other will always be annotated:
at the very least you must specify a primary key field or property
(typically via the Id annotation).

Of course, when you are using Dali to annotate your Entities, there
will be times when a class is annotated as an Entity but neither fields
nor properties are yet annotated. At those times, to improve usability,
Dali will behave as though the AccessType is FIELD (e.g. the Persistence
Outline will display the Entity's fields). Likewise, when an Entity
contains annotations on *both* fields and properties, Dali will behave
as though the AccessType is FIELD and ignore any of the property
annotations.

Brian
Re: Can't find AccessType? [message #572910 is a reply to message #433523] Fri, 10 February 2006 21:59 Go to previous message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
> I'm trying Dali for the first time, and I've run into a problem where
> import javax.persistence.AccessType cannot be resolved. Searching
> around, it appears that the class has been removed from the jboss
> container. Is there a download coming that fixes this, or is there a
> workaround? I also tried glassfish, but had the same problem.

The AccessType annotation was removed in the Proposed Final Draft
(19 Dec 2005) of JSR220. The entity's access type is now implied by
where you put your mapping annotations: If you annotate the entity's
fields, the access type is FIELD; if you annotate the entity's
properties (i.e. the getter methods), the access type is PROPERTY.

The current Dali download does not support the PFD; but that is what we
are currently working towards. See http://wiki.eclipse.org/index.php/Dali_Project

Brian
Re: Can't find AccessType? [message #573289 is a reply to message #433524] Wed, 22 February 2006 14:09 Go to previous message
Barry Kaplan is currently offline Barry KaplanFriend
Messages: 230
Registered: July 2009
Senior Member
Brian Vosburgh wrote:
>
> The AccessType annotation was removed in the Proposed Final Draft
> (19 Dec 2005) of JSR220. The entity's access type is now implied by
> where you put your mapping annotations: If you annotate the entity's
> fields, the access type is FIELD; if you annotate the entity's
> properties (i.e. the getter methods), the access type is PROPERTY.

What is the default when neither is annotated? (Hibernate EJB3 seems to
use FIELD, but is that standard?)

-barry
Re: Can't find AccessType? [message #573327 is a reply to message #433542] Wed, 22 February 2006 14:51 Go to previous message
Brian Vosburgh is currently offline Brian VosburghFriend
Messages: 137
Registered: July 2009
Senior Member
Barry Kaplan wrote:
> Brian Vosburgh wrote:
>>
>> The AccessType annotation was removed in the Proposed Final Draft
>> (19 Dec 2005) of JSR220. The entity's access type is now implied by
>> where you put your mapping annotations: If you annotate the entity's
>> fields, the access type is FIELD; if you annotate the entity's
>> properties (i.e. the getter methods), the access type is PROPERTY.
>
> What is the default when neither is annotated? (Hibernate EJB3 seems to
> use FIELD, but is that standard?)
>
> -barry

According to the spec, one or the other will always be annotated:
at the very least you must specify a primary key field or property
(typically via the Id annotation).

Of course, when you are using Dali to annotate your Entities, there
will be times when a class is annotated as an Entity but neither fields
nor properties are yet annotated. At those times, to improve usability,
Dali will behave as though the AccessType is FIELD (e.g. the Persistence
Outline will display the Entity's fields). Likewise, when an Entity
contains annotations on *both* fields and properties, Dali will behave
as though the AccessType is FIELD and ignore any of the property
annotations.

Brian
Previous Topic:cvs errors
Next Topic:DB2 License Problem
Goto Forum:
  


Current Time: Fri Apr 19 00:00:46 GMT 2024

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

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

Back to the top