I am adding CommunicationEventContentAssoc to handle the attachment of
Content attachments to CommunicationEvents. For now, I simply copied the ContentAssoc entity def and changed contentIdTo to communicationEventId, but I think some of the fields are not appropriate - primarily upperCoordinate and leftCoordinate. It being a new entity, I guess I don't need create/lastModified dates/users - right? I am using the same contentAssocTypeId and contentAssocPredicateId fields and will relate them to the same entities as currently. How does this look? -Al <!-- ========================================================= --> <!-- org.ofbiz.content.commevent --> <!-- ========================================================= --> <entity entity-name="CommunicationEventContentAssoc" package-name="org.ofbiz.content.commevent" title="CommunicationEvent Content Association Entity"> <field name="contentId" type="id-ne"></field> <field name="communicationEventId" type="id-ne"></field> <field name="contentAssocTypeId" type="id"></field> <field name="fromDate" type="date-time"></field> <field name="thruDate" type="date-time"></field> <field name="contentAssocPredicateId" type="id"></field> <field name="dataSourceId" type="id"></field> <field name="sequenceNum" type="numeric"></field> <field name="mapKey" type="name"></field> <field name="upperCoordinate" type="numeric"></field> <field name="leftCoordinate" type="numeric"></field> <field name="createdDate" type="date-time"></field> <field name="createdByUserLogin" type="id-vlong"></field> <field name="lastModifiedDate" type="date-time"></field> <field name="lastModifiedByUserLogin" type="id-vlong"></field> <prim-key field="contentId"/> <prim-key field="communicationEventId"/> <prim-key field="contentAssocTypeId"/> <prim-key field="fromDate"/> <relation type="one" fk-name="COMMEV_CONTENTASSC_FROM" title="From" rel-entity-name="Content"> <key-map field-name="contentId"/> </relation> <relation type="one" fk-name="COMMEV_CONTENTASSC_COMMEV" rel-entity-name="CommunicationEvent"> <key-map field-name="communicationEventId"/> </relation> <relation type="one" fk-name="COMMEV_CONTENTASSC_TYP" rel-entity-name="ContentAssocType"> <key-map field-name="contentAssocTypeId"/> </relation> <relation type="one" fk-name="COMMEV_CONTENTASSC_CBUSR" title="CreatedBy" rel-entity-name="UserLogin"> <key-map field-name="createdByUserLogin" rel-field-name="userLoginId"/> </relation> <relation type="one" fk-name="COMMEV_CONTENTASSC_LMBUR" title="LastModifiedBy" rel-entity-name="UserLogin"> <key-map field-name="lastModifiedByUserLogin" rel-field-name="userLoginId"/> </relation> <relation type="one" fk-name="COMMEV_CONTENTASSC_PRED" rel-entity-name="ContentAssocPredicate"> <key-map field-name="contentAssocPredicateId"/> </relation> <relation type="one" fk-name="COMMEV_CONTENTASSC_DTSRC" rel-entity-name="DataSource"> <key-map field-name="dataSourceId"/> </relation> </entity> _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
A few little thoughts on this: 1. The entity-name is too long (in db form is over 30 characters) 2. In relating a CommunicationEvent and a Content record, what would all of these fields mean? I think it's a bad idea to copy the ContentAssoc entity which is designed for _totally_ different things. Just start from scratch and add what is needed. -David Al Byers wrote: > I am adding CommunicationEventContentAssoc to handle the attachment of > Content attachments to CommunicationEvents. > > For now, I simply copied the ContentAssoc entity def and changed > contentIdTo to communicationEventId, but I think some of the fields are > not appropriate - primarily upperCoordinate and leftCoordinate. It being > a new entity, I guess I don't need create/lastModified dates/users - right? > > I am using the same contentAssocTypeId and contentAssocPredicateId > fields and will relate them to the same entities as currently. > > How does this look? > > -Al > > <!-- ========================================================= --> > <!-- org.ofbiz.content.commevent --> > <!-- ========================================================= --> > > <entity entity-name="CommunicationEventContentAssoc" > package-name="org.ofbiz.content.commevent" > title="CommunicationEvent Content Association Entity"> > <field name="contentId" type="id-ne"></field> > <field name="communicationEventId" type="id-ne"></field> > <field name="contentAssocTypeId" type="id"></field> > <field name="fromDate" type="date-time"></field> > <field name="thruDate" type="date-time"></field> > <field name="contentAssocPredicateId" type="id"></field> > <field name="dataSourceId" type="id"></field> > <field name="sequenceNum" type="numeric"></field> > <field name="mapKey" type="name"></field> > <field name="upperCoordinate" type="numeric"></field> > <field name="leftCoordinate" type="numeric"></field> > <field name="createdDate" type="date-time"></field> > <field name="createdByUserLogin" type="id-vlong"></field> > <field name="lastModifiedDate" type="date-time"></field> > <field name="lastModifiedByUserLogin" type="id-vlong"></field> > <prim-key field="contentId"/> > <prim-key field="communicationEventId"/> > <prim-key field="contentAssocTypeId"/> > <prim-key field="fromDate"/> > <relation type="one" fk-name="COMMEV_CONTENTASSC_FROM" > title="From" rel-entity-name="Content"> > <key-map field-name="contentId"/> > </relation> > <relation type="one" fk-name="COMMEV_CONTENTASSC_COMMEV" > rel-entity-name="CommunicationEvent"> > <key-map field-name="communicationEventId"/> > </relation> > <relation type="one" fk-name="COMMEV_CONTENTASSC_TYP" > rel-entity-name="ContentAssocType"> > <key-map field-name="contentAssocTypeId"/> > </relation> > <relation type="one" fk-name="COMMEV_CONTENTASSC_CBUSR" > title="CreatedBy" rel-entity-name="UserLogin"> > <key-map field-name="createdByUserLogin" > rel-field-name="userLoginId"/> > </relation> > <relation type="one" fk-name="COMMEV_CONTENTASSC_LMBUR" > title="LastModifiedBy" rel-entity-name="UserLogin"> > <key-map field-name="lastModifiedByUserLogin" > rel-field-name="userLoginId"/> > </relation> > <relation type="one" fk-name="COMMEV_CONTENTASSC_PRED" > rel-entity-name="ContentAssocPredicate"> > <key-map field-name="contentAssocPredicateId"/> > </relation> > <relation type="one" fk-name="COMMEV_CONTENTASSC_DTSRC" > rel-entity-name="DataSource"> > <key-map field-name="dataSourceId"/> > </relation> > </entity> > > > > _______________________________________________ > Dev mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/dev _______________________________________________ Dev mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/dev |
Free forum by Nabble | Edit this page |