Hi Davide, First this is wrong list. Plugins are discussed on dedicated one ( see http://xdoclet.codehaus.org/Mailing+lists ) , so I'm crossposting answer there.
--- Davide Baroncelli <[EMAIL PROTECTED]> wrote: > Hello everybody, I just installed the new 1.0.3 > version of the plugins and noticed what seems to be > a > problem, to me. All of a sudden it seems that the > hibernate plugin generates a wrong access attribute > (not requested) for ids and properties. E.g.: > /* > * @hibernate.class table="CORRECTION" > * @hibernate.discriminator column="TYPE" > */ > public abstract class OrderCorrectionSupport { > /** > * @hibernate.id generator-class="sequence" > * @hibernate.generator-param name="sequence" > value="ORDER_CORRECTION_SEQ" > */ > protected Long getId() { > return id; > } > /** > * @return The object that originated this > correction. > * @hibernate.property column="RULE_ID" > */ > public Rule getRule() { > return rule; > } > etc.etc. > > just generated: > <hibernate-mapping> > <class table="CORRECTION" > name="it.esselunga.ecommerce.services.promo.ordercorrection.OrderCorrectionSupport"> > <id access="method" name="id"><generator > class="sequence"> > <param > name="sequence">ORDER_CORRECTION_SEQ</param> > </generator> > </id> > <discriminator column="TYPE"/> > <property name="rule" access="method" > column="RULE_ID"/> > etc.etc. > > This seems to be wrong, as the hibernate doc states > that the valid values for the access property are > "property" and "field" (I'm on Hibernate 2). In fact > Hibernate explodes upon startup: > net.sf.hibernate.MappingException: could not find > PropertyAccessor class: method > Well, we generate access="" everywhere , and the problem is that hibernate folks changed access method from "property" to "method" Rule of thumb is that if tag is placed on field, field access would be generated unless overriden by access="" the same is for getter placed tags. I'm not sure what would be the best solution for this problem 1. disable implicit access generation for property/method accessing ( I recall that we started to generate access specification everywhere for some reason ) 2. take care of hibernate version and use approperiate value regards, ----[ Konstantin Pribluda http://www.pribluda.de ]---------------- Still using XDoclet 1.x? XDoclet 2 is released and of production quality. check it out: http://xdoclet.codehaus.org __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com