This is a bit experimental, so please test it and give me your feedbacks
-------- Original Message --------
Subject: [Hibernate-issues] [Hibernate-JIRA] Commented: (ANN-56)
Support mixed field/property access strategies for an Entity
Date: Tue, 3 Jan 2006 18:53:19 -0600 (CST)
From: Emmanuel Bernard (JIRA) <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-56?page=comments#action_21528 ]
Emmanuel Bernard commented on ANN-56:
-------------------------------------
you can define the @AccessType annotaiton on
an entity
a superclass
an embeddable object
a property
the access type is overriden for the annotated element, if overriden on a
class, all the properties of the given class inherit the access type.
For root entities, the access type is considered to be the default one for
other elements.
If the access type is marked as "property", the getters are scanned for annotations, if
the access type is marked as "field", the fields are scanned for annotations. Otherwise
the elements marked with @Id or @embeddedId are scanned
you can override an access type for a property, but the element to annotate will not be
influenced (for example an entity having access type = field, can annotate a field with
@AccessType("property") the access type will then be property for this
attribute. Note that the field is annotated, not the property
If a superclass or an embeddable object is not annotated, the root entity
access type is used (even if an access type has been define on an intermediate
superclass or embeddable object). The russian doll principle does not apply
Support mixed field/property access strategies for an Entity
------------------------------------------------------------
Key: ANN-56
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-56
Project: Hibernate Annotations
Type: Improvement
Components: binder
Reporter: Christian Bauer
Priority: Minor
Fix For: 3.1beta8
For any real application there are situations where access to properties and
fields has to be mixed. For example, when an Entity has property accessor
methods that call a delegate, but needs field access for all other persistent
properties. This is a known feature request, JIRA case so we don't forget.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Hibernate-issues mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-issues
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel