From: harappa75 <nu...@jb...> - 2005-07-21 02:54:06
|
Hi, After adding @ejb.persistence column-name="mr_id" It started generating correctly. so I guess I do not need @jboss.column-name="mr_id" Regards Rajesh J View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885821#3885821 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885821 |
From: mprzysucha <nu...@jb...> - 2005-08-18 18:29:00
|
I have solved the problem with parser. I have changed manualy headerin descriptor file. There was 3_0 which I've changed to 3_2. The CMP bean has deployed, but auto increment doesn't work. Still have problem with null in the primary key (new record is in a table in database, but client don't have entity bean). Could you tell me what XDoclet has generated in your descriptor file which is connected with auto_increment ?? In my jbosscmp-jdbc.xml there is only <auto-increment/> element in <cmp-field> element. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3890537#3890537 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3890537 |
From: mprzysucha <nu...@jb...> - 2005-08-18 18:55:23
|
But in file jbosscmp-jdbc_3_0.dtd there is: | <!ELEMENT cmp-field (field-name, read-only?, read-time-out?, | column-name?, not-null?, ((jdbc-type, sql-type) | (property+))? )> | It looks like JBoss is using old DTD from 3.0 version in spite of that it is version 3.2.3. Do you know what should I do ?? Maybe I shoul upgrade JBoss, but I would prefere using 3.x... I don't want to use Jboss 4.x (my Lomboz doesn't support it) View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3890505#3890505 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3890505 |
From: mprzysucha <nu...@jb...> - 2005-08-18 18:55:27
|
First of all, sorry for my english - it is not perfect. I have the same problem and i can't solve it. I've done just like you wrote above. My code is more less something like this: | | * @ejb:pk class="java.lang.Integer" | * generate="false" | * @jboss.unknown-pk class="java.lang.Integer" | * auto-increment="true" | ... | public abstract class ... { | ... | * @ejb.persistence column-name="id" | * @jboss.persistence auto-increment="true" | ... | public abstract java.lang.Integer getId(); | ... | } | and the result in file jbosscmp-jdbc.xml is: | <cmp-field> | <field-name>id</field-name> | <column-name>id</column-name> | | <jdbc-type>VARCHAR</jdbc-type> | <sql-type>int</sql-type> | | <auto-increment/> | </cmp-field> | The problem is during deploying. At the console JBoss has written: | jbosscmp-jdbc.xml process error. Line: 31. Error message: The content of element type "cmp-field" must match "(field-name,read-only?,read-time-out?,column-name?,not-null?,((jdbc-type,sql-type)|property+)?)". | it's looking like some DTD and as you see it shoudn't be <auto-increment/> element in <cmp-field> element. So why XDoclet has generated such a file :?: Did you solve this problem :?: I would be grateful if you will write exacly how i should solve it. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3890494#3890494 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3890494 |
From: mprzysucha <nu...@jb...> - 2005-08-18 19:04:57
|
In JBoss I have found jbosscmp-jdbc_3_2.dtd and in content of that file there is: | <!ELEMENT cmp-field (field-name, read-only?, read-time-out?, | column-name?, not-null?, ((jdbc-type, sql-type) | (property+))?, | auto-increment?, dbindex?, check-dirty-after-get?, state-factory? )> | We can se auto-increment in here. I don't undetstand it :/ View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3890503#3890503 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3890503 |
From: mprzysucha <nu...@jb...> - 2005-08-18 20:29:02
|
maybe it's important: I'm using Eclipse with Lomboz module. My JBoss version is 3.2.3 View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3890501#3890501 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3890501 |