You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Ejaz Ahmed <ee...@live.com> on 2014/11/20 09:22:28 UTC

Handling Entity Groups

I have created an ofbiz component in hotdeploy using ./ant create-component. I am not clear about entityengine entity grouping concept even after looking at entity engine guide and entity engine configuration guide. I have to list all my entities in entitygroup.xml file in my hotdeploy component's entitydef folder. I have all my entities in org.ofbiz group. However this is not the case for core applications like accounting and even the example app in special purpose. How these applications handle entity groups?

 Is there any relation between package-name and entity-group? I have seen somewhere that package name is just for displaying entities in webtools entity reference documentation. Is this the only purpose of package?

Regards:

Ejaz Ahmed



 		 	   		  

Re: Handling Entity Groups

Posted by Jacques Le Roux <ja...@les7arts.com>.
Le 20/11/2014 11:36, Ejaz Ahmed a écrit :
> Thanks Jacopo for your explanation.
>
>> It should work the same for your custom entities, please double
> check your setup: you shouldn't need to create the entitygroup.xml file.
> Yes. There was an issue with my custom setup and after fixing this, I can create entities without entitygroup.xml.
>
> Just for info:
> What is recommended practice for placing entities of a custom app (placed in hotdeploy) built upon ofbiz framework which is not interacting with core applications? Should these custom entities be placed in same database as those of ofbiz core apps or in separate db? Should these entities be in org.ofbiz package or in separate package?

If you have no specific needs better to keep them in the same DB.
Specific needs could be, like BI or multi-tenant but also to speed things (the old divide and "conquer" strategy), etc. (put your ideas here ;) )

Jacques

>
> Regards:
>
> Ejaz Ahmed
>
>   		 	   		

RE: Handling Entity Groups

Posted by Ejaz Ahmed <ej...@outlook.com>.
Thanks Jacopo for your explanation.

> It should work the same for your custom entities, please double 
check your setup: you shouldn't need to create the entitygroup.xml file.
Yes. There was an issue with my custom setup and after fixing this, I can create entities without entitygroup.xml. 

Just for info:
What is recommended practice for placing entities of a custom app (placed in hotdeploy) built upon ofbiz framework which is not interacting with core applications? Should these custom entities be placed in same database as those of ofbiz core apps or in separate db? Should these entities be in org.ofbiz package or in separate package?

Regards:

Ejaz Ahmed

 		 	   		  

Re: Handling Entity Groups

Posted by Jacopo Cappellato <ja...@hotwaxmedia.com>.
Hi Ejaz,

On Nov 20, 2014, at 9:22 AM, Ejaz Ahmed <ee...@live.com> wrote:

> I have created an ofbiz component in hotdeploy using ./ant create-component. I am not clear about entityengine entity grouping concept even after looking at entity engine guide and entity engine configuration guide. I have to list all my entities in entitygroup.xml file in my hotdeploy component's entitydef folder. I have all my entities in org.ofbiz group. However this is not the case for core applications like accounting and even the example app in special purpose. How these applications handle entity groups?

The entity group can be used to assign a group of entities to a different delegator (useful for example when they are part of a separate database).
The entities can be assigned to an entity group by creating an xml file containing the <entitygroup> element (and declaring it in the ofbiz-component.xml with an entry like <entity-resource type="group"...).
If you don't explicitly assign an entity to a group it is automatically assigned to the "org.ofbiz" group: this is what is done for most of the entities defined by applications.
It should work the same for your custom entities, please double check your setup: you shouldn't need to create the entitygroup.xml file.

> 
> Is there any relation between package-name and entity-group? I have seen somewhere that package name is just for displaying entities in webtools entity reference documentation. Is this the only purpose of package?

Yes, it is just for that.

Regards,

Jacopo

> 
> Regards:
> 
> Ejaz Ahmed
> 
> 
> 
>