Hi Chis:
I did not try that - due to my ignorance of how to read an xsd. However,
I just tried it and I get the following error (from the error log) while
OFBiz attempts to create the new entity, on startup:
Getting Table Info From Database
17327 (main) [ DatabaseUtil.java:356:WARN ] Entity [cdrdata]
has no table in the database
17377 (main) [ DatabaseUtil.java:364:ERROR] Could not create
table [public.CDRDATA]: SQL Exception while executing the following:
CREATE TABLE public.CDRDATA (CALL_SN SERIAL, CORRELATION_ID INT4,
....[left some of the field defs out]... MATCHED_FLAG CHAR(1),
CONSTRAINT PK_CDRDATA PRIMARY KEY ())
Error was: java.sql.SQLException: ERROR: syntax error at or near ")"
This is the same error I was getting when I had no prim-key element. The
only thing that makes this go "away" is to set one of the fields to a
primary key field. Since I'm trying to mimic a real life database table
that has no primary key, (mostly for off-line testing of my
application), it would be desirable not to have a primary key field. I'm
just wondering if I forgot to set something else - somewhere else?
Thanks for your suggestion. I learned something new and I think I'll go
back and try to understand how the xsd can help me troubleshoot future
problems.
Regards,
Ruth
Chris Howe wrote:
Did you try defining it as an empty prim-key group?
ie <prim-key field=""/>
As far as the entitymodel.xsd, "prim-key" is a
required element and the attribute "field" is required
--- Ruth Hoffman <[EMAIL PROTECTED]> wrote:
Hello All:
Is this possible: can I create an entity without a
primary key?
TIA
Ruth