[ 
https://issues.apache.org/jira/browse/MAILBOX-14?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980577#action_12980577
 ] 

Norman Maurer commented on MAILBOX-14:
--------------------------------------

Thanks for the "cool" graphs :)  

Some comments:
* I found the SID name a bit strange. Maybe I'm just more used to ID. 


@Basic(optional=false) vs @Column(nullable=false)

* @Column(nullable=false) is an instruction for generating the schema. The 
database column generated off the class will be marked not nullable in the 
actual database.
    optional=false is a runtime instruction. The primary functional thing it 
does is related to Lazy Loading. You can't lazy load a non-collection mapped 
entity unless you remember to set optional=false   (because Hibernate doesn't 
know if there should be a proxy there or a null, unless you tell it nulls are 
impossible, so it can generate a proxy.)

* http://markmail.org/message/osod6rsauwbnkvya <- I think this is a good 
explaination. 

So at the end I think we should use @Column(nullable=false)

* If we can get the FK between JAMES_MAILBOX and JAMES_MAILBOX_MEMBERSHIP to 
work we should use it. It just enforce the right model



> Name JPA Database Tables and Columns
> ------------------------------------
>
>                 Key: MAILBOX-14
>                 URL: https://issues.apache.org/jira/browse/MAILBOX-14
>             Project: James Mailbox
>          Issue Type: Improvement
>            Reporter: Eric Charles
>         Attachments: james-jpa-db-1-with-mailbox-fk.png, 
> james-jpa-db-1-without-mailbox-fk.png
>
>
> The database tables and columns naming are delegated to OpenJPA. This depends 
> on the database.
> We should fix them via JPA annotations so we have predictive and common 
> behaviour on all databases (mysql, oracle,...).
> We should respect the uppercase and underscore pattern (TABLE_NAME, 
> COLUMN_NAME).
> All JPA Domain classes need to be adapted (mailbox) in IMAP, but also in 
> server.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to