I would like to stay with 3.2.1 because we've spent some time modifying the source for our own use and would like to not have to do that for 3.2.x just yet.
Thanks,
-M@
On Friday, September 5, 2003, at 04:44 AM, Alexey Loubyansky wrote:
You should use auto-increment with postgresql-fetch-seq entity-command and use JBoss-3.2.
alex
Matthew Hixson wrote:
It seems that JBoss is trying to execute some invalid SQL. It is trying to do an insert into my partners table and passing 'null' for the primary key. This is causing the Postgres driver to report:
Fail to add null value in not null attribute partner_id
The SQL looks like this:
INSERT INTO v_partners (partner_id, name, description, partner_type_id) VALUES (null, 'asdf', 'asdfasdf', null)
and my schema definition looks like:
Table "public.v_partners"
Column | Type | Modifiers
-----------------+------------------------ +-----------------------------------------------------
partner_id | integer | not null default nextval('partners_sequence'::text)
partner_type_id | integer |
name | character varying(200) |
description | character varying(200) |
I tried adding:
@jboss.persistence
auto-increment="true"
to my bean. This put <auto-increment/> into jbosscmp-jdbc.xml, but then JBoss complained about it being an illegal XML document. This is it:
<entity>
<ejb-name>Partner</ejb-name>
<table-name>v_partners</table-name>
<cmp-field>
<field-name>partnerId</field-name>
<column-name>partner_id</column-name>
<auto-increment/>
</cmp-field>
<cmp-field>
<field-name>name</field-name>
<column-name>name</column-name>
</cmp-field>
<cmp-field>
<field-name>description</field-name>
<column-name>description</column-name>
</cmp-field>
Is xdoclet sticking the <auto-increment/> tag in the wrong location?
Is there any way to get JBoss to leave the primary key out of the insert statement? If it matters, I'm using commit option A.
Thanks,
-M@
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
