You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by swathi <re...@yahoo.com> on 2009/11/05 17:12:47 UTC

adding record to table - from practice app

Hi

Iam trying to create a new record in Person table from my practice
application in hot-deploy. The entity, Person is defined in entity-model of
Party in applications component. Do i have to make an entry of
<entity-resource type="model" reader-name="main" loader="main"
location="entitydef/entitymodel.xml"/> in my ofbiz-component.xml.

I entered:
<entity-resource type="data" reader-name="demo" loader="main"
location="data/PracticeData.xml"/> in my ofbiz-component.xml

and my hot-deploy/practice/data/PracticeData.xml contains:

<?xml version="1.0" encoding="UTF-8" ?>
<entity-engine-xml>
	<Party partyId="DemoUser" partyTypeId="PERSON"/>
	<Person partyId="DemoUser" firstName="Practice" lastName="Person" />
	<PartyRole partyId="DemoUser" roleTypeId="VISITOR"/>
	<ContactMech contactMechId="5000" contactMechTypeId="EMAIL_ADDRESS"
infoString="practice.person@gmail.com"/>
	<PartyContactMech  partyId="DemoUser" contactMechId="5000"
fromDate="2009-11-05 00:00:00.000" allowSolicitation="Y"/>
	<PartyContactMechPurpose partyId="DemoUser" contactMechId="5000"
contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2009-11-05
00:00:00.000"/>
</entity-engine-xml>

(with reference to beginners practice application)

I did:

ant-clean
run ant.bat
run-install
startofbiz from cmd prompt. 

The record is not added in the table.. Can someone please help me as to what
has to be done more..

Thankyou.
-- 
View this message in context: http://n4.nabble.com/adding-record-to-table-from-practice-app-tp510160p510160.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: adding record to table - from practice app

Posted by Pranay Pandey <pr...@hotwaxmedia.com>.
Hi Swati,

Reading of "The Data Model Resource Book, Revised Edition, Volumes 1 & 2

Re: adding record to table - from practice app

Posted by swathi <re...@yahoo.com>.
In my build.xml which I copied from /applications/party/build.xml, I replaced 
<fileset dir="../content/build/lib" includes="*.jar"/>  with  <fileset
dir="../../applications/party/build/lib" includes="*.jar"/>

did run-install and restarted ofbiz. It added a record for me. But Iam not
sure in the practice app, why the author created records for other tables .
I dont know if that is necessary or they are created as examples..

swathi wrote:
> 
> Hi
> 
> Iam trying to create a new record in Person table from my practice
> application in hot-deploy. The entity, Person is defined in entity-model
> of Party in applications component. Do i have to make an entry of
> <entity-resource type="model" reader-name="main" loader="main"
> location="entitydef/entitymodel.xml"/> in my ofbiz-component.xml.
> 
> I entered:
> <entity-resource type="data" reader-name="demo" loader="main"
> location="data/PracticeData.xml"/> in my ofbiz-component.xml
> 
> and my hot-deploy/practice/data/PracticeData.xml contains:
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> <entity-engine-xml>
> 	<Party partyId="DemoUser" partyTypeId="PERSON"/>
> 	<Person partyId="DemoUser" firstName="Practice" lastName="Person" />
> 	<PartyRole partyId="DemoUser" roleTypeId="VISITOR"/>
> 	<ContactMech contactMechId="5000" contactMechTypeId="EMAIL_ADDRESS"
> infoString="practice.person@gmail.com"/>
> 	<PartyContactMech  partyId="DemoUser" contactMechId="5000"
> fromDate="2009-11-05 00:00:00.000" allowSolicitation="Y"/>
> 	<PartyContactMechPurpose partyId="DemoUser" contactMechId="5000"
> contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2009-11-05
> 00:00:00.000"/>
> </entity-engine-xml>
> 
> (with reference to beginners practice application)
> 
> I did:
> 
> ant-clean
> run ant.bat
> run-install
> startofbiz from cmd prompt. 
> 
> The record is not added in the table.. Can someone please help me as to
> what has to be done more..
> 
> Thankyou.
> 

-- 
View this message in context: http://n4.nabble.com/adding-record-to-table-from-practice-app-tp510160p532777.html
Sent from the OFBiz - User mailing list archive at Nabble.com.