You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Altafhusen Makandar <al...@gmail.com> on 2022/03/21 08:42:51 UTC

Avoid creating entry in content_keyword on content and party_content creation

Hi, When I create a record in the "content" table using
dispatcher.runSync("createContent", map), it also creates an entry in
"content_keyword" table with keyword=contentId. Is there a way to avoid
creating this entry? Also, when I create a records in "party_content" table
using  dispatcher.runSync("createPartyContent", map), it creates entries in
"content_keyword" with keywords having the values from "groupName" in
"party_group" table. Is there a way to avoid this as well? Thank you in
advance.

Re: Avoid creating entry in content_keyword on content and party_content creation

Posted by Nicolas Malin <ni...@nereide.fr>.
Hello Altafhusen,

Check the file applications/content/entitydef/eecas.xml that contains
trigger to call service to create content keywords.

And after create your own implementation of service
'indexContentKeywords' to populate the entity as you wish.

****
    <service name="indexContentKeywords" engine="groovy"
               
location="component://content/groovyScripts/content/ContentServices.groovy"
invoke="indexContentKeywords" auth="false">
        <description>Index the Keywords for a Content</description>
        <attribute name="contentId" type="String" mode="IN"
optional="false">
            <type-validate>
                <fail-property resource="ContentErrorUiLabels"
property="ContentRequiredFieldMissingContentId"/>
            </type-validate>
        </attribute>
        <attribute name="contentInstance"
type="org.apache.ofbiz.entity.GenericValue" mode="IN" optional="true"/>
    </service>
****

Cheers,
Nicolas

On 22/03/2022 09:27, Altafhusen Makandar wrote:
> Can someone provide some solution on this?
>
> On Mon, Mar 21, 2022, 09:42 Altafhusen Makandar <al...@gmail.com>
> wrote:
>
>> Hi, When I create a record in the "content" table using
>> dispatcher.runSync("createContent", map), it also creates an entry in
>> "content_keyword" table with keyword=contentId. Is there a way to avoid
>> creating this entry? Also, when I create a records in "party_content" table
>> using  dispatcher.runSync("createPartyContent", map), it creates entries in
>> "content_keyword" with keywords having the values from "groupName" in
>> "party_group" table. Is there a way to avoid this as well? Thank you in
>> advance.
>>


Re: Avoid creating entry in content_keyword on content and party_content creation

Posted by Altafhusen Makandar <al...@gmail.com>.
Can someone provide some solution on this?

On Mon, Mar 21, 2022, 09:42 Altafhusen Makandar <al...@gmail.com>
wrote:

> Hi, When I create a record in the "content" table using
> dispatcher.runSync("createContent", map), it also creates an entry in
> "content_keyword" table with keyword=contentId. Is there a way to avoid
> creating this entry? Also, when I create a records in "party_content" table
> using  dispatcher.runSync("createPartyContent", map), it creates entries in
> "content_keyword" with keywords having the values from "groupName" in
> "party_group" table. Is there a way to avoid this as well? Thank you in
> advance.
>