[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3298) seam-gen doesn't handle hibernate types such as yes_no
Dan Allen (JIRA)
jira-events at lists.jboss.org
Mon Mar 30 01:15:22 EDT 2009
[ https://jira.jboss.org/jira/browse/JBSEAM-3298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12459540#action_12459540 ]
Dan Allen commented on JBSEAM-3298:
-----------------------------------
Resolved by making the following two changes:
1. Don't add @Length annotation for boolean types
2. Add @Type(type = "yes_no") annotation to entity properties that are set to the hibernate type "yes_no"
> seam-gen doesn't handle hibernate types such as yes_no
> ------------------------------------------------------
>
> Key: JBSEAM-3298
> URL: https://jira.jboss.org/jira/browse/JBSEAM-3298
> Project: Seam
> Issue Type: Bug
> Components: Tools
> Affects Versions: 2.0.3.CR1
> Environment: JBoss 4.2.2, DB2, Linux
> Reporter: Valerie Griffin
> Assignee: Dan Allen
> Fix For: 2.2.0.CR1
>
> Attachments: EntityHome.java.ftl, GetPropertyAnnotation.ftl
>
>
> My database has quite a few CHAR(1) entries used as boolean values where the field can contain Y or N. I defined these entries as hibernate yes_no in the seam-gen.reveng.xml file, but the code didn't reflect the data type. To work, the field needs to be annotated with
> @Type(type = "yes_no")
> and needs to not contain an annotation like:
> @Length(max = 1)
> If the Type annotation is absent, hibernate detects a schema mismatch. (It expects a numeric boolean value.)
> If there's a Length annotation, the UI's checkbox displays a surprising error message about the data length.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list