PS. After little research I have next situation.
Two nuxeo instances - first against jcr, second against vcs. Both of them are
configured to use same postgre server as sql backend with two different DBs and
both of them are use same version of jdbc driver. I have contributed next
schema:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.setelis.com/nuxeo/addressbook">
<xs:element name="firstName" type="xs:string"/>
<xs:element name="lastName" type="xs:string"/>
<xs:element name="email" type="xs:string"/>
<xs:element name="phone" type="xs:string"/>
<xs:element name="company" type="xs:string"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="mailBoxId" type="xs:string"/>
<xs:element name="idField" type="xs:integer"/>
</xs:schema>
and next directory:
<extension target="org.nuxeo.ecm.directory.sql.SQLDirectoryFactory"
point="directories">
<directory name="addressBook">
<schema>addressbook</schema>
<dataSource>java:/nxsqldirectory</dataSource>
<table>addressbook</table>
<createTablePolicy>on_missing_columns</createTablePolicy>
<idField>ab:idField</idField>
<autoincrementIdField>true</autoincrementIdField>
</directory>
</extension>
I notice that DB which I used for nuxeo instance with jcr creates table
addressbook with script:
CREATE TABLE addressbook
(
"ab:idField" character varying(255),
"ab:company" character varying(255),
"ab:name" character varying(255),
"ab:firstName" character varying(255),
"ab:email" character varying(255),
"ab:lastName" character varying(255),
"ab:phone" character varying(255),
"ab:mailBoxId" character varying(255)
)
WITH (OIDS=FALSE);
ALTER TABLE addressbook OWNER TO stefan;
and DB which is using for vcs creates table addressbook with script:
CREATE TABLE addressbook
(
"ab:idField" integer,
"ab:company" character varying(255),
"ab:name" character varying(255),
"ab:firstName" character varying(255),
"ab:email" character varying(255),
"ab:lastName" character varying(255),
"ab:phone" character varying(255),
"ab:mailBoxId" character varying(255)
)
WITH (OIDS=FALSE);
ALTER TABLE addressbook OWNER TO stefan;
In first case autoincremented field is of type character varying(255), and in
second case is of type integer.
That cause my problem. Any idea howto workaround this issue?
--
Posted by "[email protected]" at Nuxeo Discussions
<http://nuxeo.org/discussions>
View the complete thread:
<http://www.nuxeo.org/discussions/thread.jspa?threadID=2901#8482>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm