[forge-issues] [JBoss JIRA] (FORGE-835) Forge field plugin doesn't support lobs / byte arrays

Ivan St. Ivanov (JIRA) jira-events at lists.jboss.org
Wed Apr 3 04:21:42 EDT 2013


    [ https://issues.jboss.org/browse/FORGE-835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764610#comment-12764610 ] 

Ivan St. Ivanov commented on FORGE-835:
---------------------------------------

Hey George,

Thanks for mentioning that! I did a quick research and found that on some databases JPA creates the column with different type based on the 'length' attribute of the @Column annotation.

Should we always set it to MAX_VALUE or we should let the user configure it with an option (defaulting to MAX_VALUE)? Something like:

field lob --named <field-name> [--length <length>]

Cheers,
Ivan
                
> Forge field plugin doesn't support lobs / byte arrays
> -----------------------------------------------------
>
>                 Key: FORGE-835
>                 URL: https://issues.jboss.org/browse/FORGE-835
>             Project: Forge
>          Issue Type: Feature Request
>          Components: Builtin Plugins
>    Affects Versions: 1.2.2.Final
>            Reporter: Ivan St. Ivanov
>            Assignee: Ivan St. Ivanov
>             Fix For: 1.2.3.Final
>
>
> Right now Forge's field plugin supports most of the common Java/JPA types as commands (string, number, date, etc.). It also supports JPA relationships (one-to-many, etc.). However, a very common scenario for a Java EE developer is to store an image or other binary object into the database.
> In such situations the JPA best practices say that it should be declared as byte array field and annotated with @Lob.
> Forge should be able to generate such fields when the command:
> {code:java}
> field lob --named <field-name> 
> {code}
> is issued
> The exact name of the command (lob or bytearray or anything) is subject to discussion.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the forge-issues mailing list