facebook

xdoclet hibernate generator-param error

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #256015 Reply

    I am using MyEclipse v5.0M2 eclipse3.2. I am generating my hbm.xml with xdoclet. I have an Account pojo with its id generated by database sequence, using the following annotation:

    
    /**
         * getter for Account's identifier
         * 
         * @hibernate.id generator-class="sequence" column="ACCOUNTID"
         * @hibernate.generator-param name="sequence" value="SEQ_ACCOUNT"
         */
        public Integer getAccountId() {
            return this.accountid;
        }
    

    I get the following incorrect fragment in my Account.hbm.xml:

    
    <id
                name="accountId"
                column="ACCOUNTID"
                type="java.lang.Integer"
            >
                <generator class="sequence">
                    <param>SEQ_ACCOUNT</param>
                  <!--  
                      To add non XDoclet generator parameters, create a file named 
                      hibernate-generator-params-Account.xml 
                      containing the additional parameters and place it in your merge dir. 
                  --> 
                </generator>
            </id>
    
    <param>SEQ_ACCOUNT</param>

    should instead be

    <param name="sequence">SEQ_ACCOUNT</param>

    Any ideas as to what I am doint wrong / what I can do to get it to work? Hibernate bombs out on me immediately the way it is now.

    Thanks,

    jim

    #256024 Reply

    Riyad Kalla
    Member

    Jim,
    While we do integrate the xdoclet runner code into MyEclipse, the actual XDoclet generation is handled by the XDoclet libraries.

    Searching the XDoclet site lead me to what I think is exactly your issue, marked as WONTFIX: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-500

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: xdoclet hibernate generator-param error

You must be logged in to post in the forum log in