From: Daniel P. (JIRA) <no...@at...> - 2006-07-28 19:25:39
|
hbm2java task: meta support needed for class level annotations -------------------------------------------------------------- Key: HBX-713 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-713 Project: Hibernate Tools Type: Bug Components: hbm2java Versions: 3.2beta6 Environment: hibernate tools 3.2 beta 6 JBoss 4.0.4.GA with EJB3 Reporter: Daniel Pocock We use hbm2java to create EJB3 entity beans from hbm files. It would be really useful to use the `meta' element to insert additional class level annotations. Is someone already working on such a feature, or should I submit a patch? Here is an example of what I would like to do: <meta attribute="extra-import">org.jboss.seam.annotations.Name</meta> <meta attributre="class-annotation">@Name("myObject")</meta> such that the following code would be generated: import javax.ejb.Entity; import org.jboss.seam.annotations.Name; @Entity @Name("myObject") public class MyObject .... -- 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 |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-29 16:40:52
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-713?page=comments#action_23798 ] Max Rydahl Andersen commented on HBX-713: ----------------------------------------- sorry, but in what usecase scenario does it make sense to generate this from hbm.xml if you are already using annotations? > hbm2java task: meta support needed for class level annotations > -------------------------------------------------------------- > > Key: HBX-713 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-713 > Project: Hibernate Tools > Type: Bug > Components: hbm2java > Versions: 3.2beta6 > Environment: hibernate tools 3.2 beta 6 > JBoss 4.0.4.GA with EJB3 > Reporter: Daniel Pocock > > Original Estimate: 1 hour > Remaining: 1 hour > > We use hbm2java to create EJB3 entity beans from hbm files. It would be really useful to use the `meta' element to insert additional class level annotations. Is someone already working on such a feature, or should I submit a patch? > Here is an example of what I would like to do: > <meta attribute="extra-import">org.jboss.seam.annotations.Name</meta> > <meta attributre="class-annotation">@Name("myObject")</meta> > such that the following code would be generated: > import javax.ejb.Entity; > import org.jboss.seam.annotations.Name; > @Entity > @Name("myObject") > public class MyObject .... -- 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 |
From: Daniel P. (JIRA) <no...@at...> - 2006-07-29 16:59:15
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-713?page=comments#action_23799 ] Daniel Pocock commented on HBX-713: ----------------------------------- hbm2java only inserts the EJB3 annotations (e.g. @Entity) - we want to insert any arbitrary annotation, e.g. annotations used for Seam > hbm2java task: meta support needed for class level annotations > -------------------------------------------------------------- > > Key: HBX-713 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-713 > Project: Hibernate Tools > Type: Bug > Components: hbm2java > Versions: 3.2beta6 > Environment: hibernate tools 3.2 beta 6 > JBoss 4.0.4.GA with EJB3 > Reporter: Daniel Pocock > > Original Estimate: 1 hour > Remaining: 1 hour > > We use hbm2java to create EJB3 entity beans from hbm files. It would be really useful to use the `meta' element to insert additional class level annotations. Is someone already working on such a feature, or should I submit a patch? > Here is an example of what I would like to do: > <meta attribute="extra-import">org.jboss.seam.annotations.Name</meta> > <meta attributre="class-annotation">@Name("myObject")</meta> > such that the following code would be generated: > import javax.ejb.Entity; > import org.jboss.seam.annotations.Name; > @Entity > @Name("myObject") > public class MyObject .... -- 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 |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-30 13:32:15
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-713?page=comments#action_23800 ] Max Rydahl Andersen commented on HBX-713: ----------------------------------------- yes I understood what you wanted to do; I just don't understand the usecase ;) Why are you not writing the entities directly instead of via hbm.xml's ? Adding class-annotation, might make sense, but I'm just curious since it feels a bit backward and what will be needed next? (e.g. property-get-annotation etc.) > hbm2java task: meta support needed for class level annotations > -------------------------------------------------------------- > > Key: HBX-713 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-713 > Project: Hibernate Tools > Type: Bug > Components: hbm2java > Versions: 3.2beta6 > Environment: hibernate tools 3.2 beta 6 > JBoss 4.0.4.GA with EJB3 > Reporter: Daniel Pocock > > Original Estimate: 1 hour > Remaining: 1 hour > > We use hbm2java to create EJB3 entity beans from hbm files. It would be really useful to use the `meta' element to insert additional class level annotations. Is someone already working on such a feature, or should I submit a patch? > Here is an example of what I would like to do: > <meta attribute="extra-import">org.jboss.seam.annotations.Name</meta> > <meta attributre="class-annotation">@Name("myObject")</meta> > such that the following code would be generated: > import javax.ejb.Entity; > import org.jboss.seam.annotations.Name; > @Entity > @Name("myObject") > public class MyObject .... -- 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 |
From: Daniel P. (JIRA) <no...@at...> - 2006-07-30 17:11:13
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-713?page=comments#action_23802 ] Daniel Pocock commented on HBX-713: ----------------------------------- a) I prefer to describe my entities with XML descriptions rather than writing all the necessary Java code, setters, getters, etc - is this no longer the correct way of doing things? I write the definitions in XML, and then use hbm2ddl to create my database tables, and hbm2java to create the Entity bean classes b) When the generated classes are used at higher levels of the application (e.g. the UI layer, with Seam), the annotations are required > hbm2java task: meta support needed for class level annotations > -------------------------------------------------------------- > > Key: HBX-713 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-713 > Project: Hibernate Tools > Type: Bug > Components: hbm2java > Versions: 3.2beta6 > Environment: hibernate tools 3.2 beta 6 > JBoss 4.0.4.GA with EJB3 > Reporter: Daniel Pocock > > Original Estimate: 1 hour > Remaining: 1 hour > > We use hbm2java to create EJB3 entity beans from hbm files. It would be really useful to use the `meta' element to insert additional class level annotations. Is someone already working on such a feature, or should I submit a patch? > Here is an example of what I would like to do: > <meta attribute="extra-import">org.jboss.seam.annotations.Name</meta> > <meta attributre="class-annotation">@Name("myObject")</meta> > such that the following code would be generated: > import javax.ejb.Entity; > import org.jboss.seam.annotations.Name; > @Entity > @Name("myObject") > public class MyObject .... -- 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 |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-30 18:02:14
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-713?page=comments#action_23803 ] Max Rydahl Andersen commented on HBX-713: ----------------------------------------- ...and you do know that hbm2ddl also works for annotations ? (the hbm in hbm2ddl stands for hibenrate meta model or mapping model if you so wish, it does not stand for hbm.xml) And codegeneration based on annotations is also completely possible if you wish to do that. just use an <annotationconfiguration> > hbm2java task: meta support needed for class level annotations > -------------------------------------------------------------- > > Key: HBX-713 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-713 > Project: Hibernate Tools > Type: Bug > Components: hbm2java > Versions: 3.2beta6 > Environment: hibernate tools 3.2 beta 6 > JBoss 4.0.4.GA with EJB3 > Reporter: Daniel Pocock > > Original Estimate: 1 hour > Remaining: 1 hour > > We use hbm2java to create EJB3 entity beans from hbm files. It would be really useful to use the `meta' element to insert additional class level annotations. Is someone already working on such a feature, or should I submit a patch? > Here is an example of what I would like to do: > <meta attribute="extra-import">org.jboss.seam.annotations.Name</meta> > <meta attributre="class-annotation">@Name("myObject")</meta> > such that the following code would be generated: > import javax.ejb.Entity; > import org.jboss.seam.annotations.Name; > @Entity > @Name("myObject") > public class MyObject .... -- 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 |