[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-67) Add annotations to java templates

miguel de anda (JIRA) noreply at atlassian.com
Fri Apr 18 18:07:33 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_30025 ] 

miguel de anda commented on HBX-67:
-----------------------------------

That patch adds annotations for fields, getter methods and classes. See the following hbm sample for usage...

<hibernate-mapping>
	<class name="blah.blah" table="tblVideo">
		<meta attribute="class-description">
			@author Miguel
		</meta>
		<meta attribute="class-annotation">@Class1</meta>
		<meta attribute="class-annotation">@Class2</meta>
...
		<property
			 name="title"
			 type="java.lang.String"
			 update="true"
			 insert="true"
			 access="property"
			 >
			<meta attribute="field-description">this is a field description that miguel added</meta>
			<meta attribute="field-annotation">@Field1</meta>
			<meta attribute="field-annotation">@Field2</meta>
			<meta attribute="getter-annotation">@Getter1</meta>
			<meta attribute="getter-annotation">@Getter2</meta>
			<column name="Title" sql-type="nvarchar2 (200)" />
		</property>
...

I didn't add the annotations to getter because a) i was getting lazy, and b) haven't run into a need for it yet.

> Add annotations to java templates
> ---------------------------------
>
>                 Key: HBX-67
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-67
>             Project: Hibernate Tools
>          Issue Type: New Feature
>            Reporter: Max Rydahl Andersen
>
> Need to add the basic jdk 1.5 annotations to the java velocity template.

-- 
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

        



More information about the hibernate-issues mailing list