Maybe a Patient party role would be more appropriate.


BJ Freeman wrote:

like any relational database, if you have tables that are realated and
they have data in them then that data may be lost.

as a side note: look at using a party as person and create a Patient
Party group. saves doing redundant work


Edward Banfa sent the following on 12/17/2007 3:50 AM:

Hi Jacques,

Ummm, what are the implications of deleting a table in ofbiz apart from loss
of data contained in that table? Coz I just deleted a table using the SQL
processor (am actually just learning Ofbiz, am not yet working on a building
a production app). I had previously defined an entity called Patient and
after a I deleted the table and I restarted ofbiz, I cant see my entity in
the Entity Data Maintenance page of webtools. Issuing the following SQL "SELECT * FROM PATIENT" from the SQL processor page throws an exception, the
trace in console.log says: ERROR 42X05: Table/View 'PATIENT' does not exist.

Am I missing something here?

All help appreciated, thx

Regards

Edward

Below are my entitymodel.xml and entitygroup.xml files repectively

--------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/entitymodel.xsd";>
 <!-- ========================================================= -->
 <!-- ======================== Defaults ======================= -->
 <!-- ========================================================= -->
   <title>Entities for a Hello world component</title>
   <description>None</description>
   <copyright>Copyright (c) Hello World, Inc.</copyright>
   <author>Edward Banfa</author>
   <version>0.1</version>

   <entity entity-name="Patient" package-name="org.helloworld.emedic"
       title="Entity to represent mentally sick people in government">
       <field name="patientId" type="id-ne"/>
       <field name="firstName" type="id"/>
       <field name="lastName" type="id"/>
       <field name="appointment" type="id"/>
<prim-key field="patientId"/> </entity> </entitymodel>
-------------------------------------------------------------------------

-------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>

<entitygroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/entitygroup.xsd";>


 <entity-group group="org.ofbiz" entity="Patient"/>

</entitygroup>

--------------------------------------------------------------------------












-----Original Message-----
From: Jacques Le Roux [mailto:[EMAIL PROTECTED] Sent: Monday, December 17, 2007 11:56 AM
To: [email protected]
Subject: Re: Deleting a table

http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo

Look for Derby, not sure there is exactly an answer but you should find your
way from there. Beware that it's not recommended to
delete tables in OFBiz...

Jacques

De : "Edward Banfa" <[EMAIL PROTECTED]>

Hi all.



I would like to know how to delete a table in the Derby database that

comes

with Ofbiz.



Actually I have a problem with a an entity that I created, I want to alter
the columns on the entity and hence in the underlying table that

represents

the data for the entity. Do I have to drop the existing table or is there

a

way I can have ofbiz pickup any changes in the

entity definition and update the db schema ?



Thank u for ur help in advance



Regards



Edward














Reply via email to