--- Glen Marchesani <[EMAIL PROTECTED]> wrote:

> Short Question:
> 
> Is there any way to turn off the schema validation
> in the hibernate 
> plugin (or any plugin)?  For example if I am missing
> a property I get an 
> error like this
> 
> java.lang.RuntimeException:
> java.lang.RuntimeException: 
> @hibernate.one-to-many in
> com.appliqa.tasktracker.Category (line 36):
> class="???" must be specified.  


This is not schema validation, this is tag parse 
validation.   Tag implementation do it themselves.

Turning tag validation out is currently unsuported
( though it could be with some effort ) 

> In this case I didn't include the class= attribute
> in the 
> @hibernate.one-to-many tag
> 
> Where I would prefer for xdoclet to proceed and
> output the hibernate 
> mappings files and I will have a post xdoclet
> process to fix/validate 
> the file myself.
> 
> 
> Longer Bacgrkound Explanation:
> 
> We do post xdoclet processing that we would like to
> fill in the defaults 
> for alot of fields but unfortunately xdoclet2 won't
> let us leave certain 
> fields blanks..
> 
> For example take this set of xdoclet tags
> 
>     /**
>      * @hibernate.map
>      *        lazy="true"
>      *        cascade="all"
>      *        inverse="true"
>      *   
>      * @hibernate.key
>      *         column="category_uid"
>      *
>      * @hibernate.index
>      *         type="long"
>      *         column="person_uid"
>      *
>      * @hibernate.one-to-many
>      *       
> class="com.appliqa.tasktracker.CategoryWatcher"
>      *
>      */
>     private Map<Long,CategoryWatcher> watchers_;
> 
> Given the standards for our app and the generic
> types in the map I would 
> like to only specify the following and let xdoclet
> create the hibernat 
> emapigs file then have the post processing stuff
> fill in the rest... 
> 
>     /**
>      * @hibernate.map
>      *        inverse="true"
>      *
>      * @hibernate.one-to-many
>      *
>      */
>     private Map<Long,CategoryWatcher> watchers_;

So you like to posprocess your xml to  fill in the
classname of the relation? 

What about @hibernate.one-to-many class="#foobar#" ?

Alternatively you can patch hibernate plugin qtag
( just remove @qtags.required from respective  method
decl )


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 

Reply via email to