[hibernate-dev] Separating javax.persistence.AccessType and org.hibernate.property.PropertyAccessor
Gail Badner
gbadner at redhat.com
Fri Mar 7 13:31:47 EST 2014
+1 for separating.
----- Original Message -----
> From: "Hardy Ferentschik" <hardy at hibernate.org>
> To: "Steve Ebersole" <steve at hibernate.org>
> Cc: "Hibernate" <hibernate-dev at lists.jboss.org>
> Sent: Thursday, March 6, 2014 2:30:21 AM
> Subject: Re: [hibernate-dev] Separating javax.persistence.AccessType and org.hibernate.property.PropertyAccessor
>
>
> On 5 Jan 2014, at 18:40, Steve Ebersole <steve at hibernate.org> wrote:
>
> > Historically annotation binding within Hibernate made a huge assumption
> > that AccessType and PropertyAccessor were the same thing. They aren't
> > necessarily. AccessType is simply meant to dictate where to look for
> > annotations relating to "persistent attributes". PropertyAccessor is
> > Hibernate's way of accessing property values (getting/setting) at runtime.
> >
> > Granted, AccessType *by default* should indicate the PropertyAccessor to
> > use. I am not arguing that. I am just suggesting that we should keep both
> > as distinct values. At the moment we collapse them into a single String
> > (we dump AccessType and keep "PropertyAccessor name").
> >
> > The trouble is that later on we sometimes need to know the AccessType, at
> > which point we are forced to make a guess by interpreting the
> > PropertyAccessor in use and hoping that a custom PropertyAccessor was not
> > supplied.
>
> I don’t know where it is exactly where you need the distinction, but if you
> do,
> I also think they should be kept separated. Also having distinct concepts for
> this maybe
> makes concepts also a bit clearer.
>
> +1 from me
>
> —Hardy
>
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
More information about the hibernate-dev
mailing list