[JBoss-user] [Persistence CMP/JBoss] - Re: Unknown-PK Problems...

2004-06-18 Thread gavin9
Hello, How do you get a reference to your primary key using your method below? sesques wrote : Normally, this should work and is compliant wth the EJB spec. | (But if not, keep your version as well, it will be a software mystery ;-) | | | | /** | | * The Employee Entity Bean

[JBoss-user] [Persistence CMP/JBoss] - Re: Unknown-PK Problems...

2004-06-18 Thread loubyansky
getPrimaryKey() on EJB[Local]Object or EntityContext. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3839177#3839177 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3839177

[JBoss-user] [Persistence CMP/JBoss] - Re: Unknown-PK Problems...

2004-04-25 Thread mpforste
With MySQL you can have AutoIncrement Primary Key Fields without using Unknown-PK's BUT you have to let JBoss create the Database (or make sure you create it correctly to match what JBoss is looking for. The key is to dec;are your PK in jbosscmp-jdbc.xml as auto-increment/ and have the

[JBoss-user] [Persistence CMP/JBoss] - Re: Unknown-PK Problems...

2004-04-23 Thread hxp
Sesques -- I've tried quite a number of different variations on the xdoclet tags, and each variation has its problems. Here are some samples of what seem to be perverse interactions between CMR and unknownpk: 00:40:52,984 INFO [EjbModule] Deploying FaqCategoryEJB | 00:40:52,984 INFO

[JBoss-user] [Persistence CMP/JBoss] - Re: Unknown-PK Problems...

2004-04-23 Thread sesques
Hi hpx, I confess having no interrest on Nukes, so I cannot help you about it. About unknow-pk and CMR, of course unknown-pk can be used by relationships. I use it myself without problem, declaring unknow-pk field-name as related-pk-field on a jboss relation: Example: My first entity bean

[JBoss-user] [Persistence CMP/JBoss] - Re: Unknown-PK Problems... with XDoclet and CMR

2004-04-22 Thread hxp
Hi -- Has anybody noticed Unknown-PK Problems, with XDoclet and _CMR_? Are there known-bugs regarding CMR interaction with Unknown-PK that have already been posted against JBoss3.2.3? Anybody know of relevant forum/wiki URLs? Or... has anybody gotten Unknown-PK going with XDoclet and _CMR_,

[JBoss-user] [Persistence CMP/JBoss] - Re: Unknown-PK Problems...

2004-04-22 Thread sesques
Unknow-pk got nothing to do with CMR fields View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3831936#3831936 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3831936 ---

[JBoss-user] [Persistence CMP/JBoss] - Re: Unknown-PK Problems...

2004-04-22 Thread hxp
Yes, CMR and unknown-pk are distinct concepts, but they could interact in practice because CMR creates foreign key relationships and thus uses the pk of the entity at the other end of the relationship. View the original post :

[JBoss-user] [Persistence CMP/JBoss] - Re: Unknown-PK Problems...

2004-04-13 Thread KarstenTS
That are good points. In fact, now that you tell it, I remember to have read the object things and am now wondering, why this works. Well, it does. Even though the ejbCreate is Integer. Strange... I had an error, with not declaring a pk-field, or having a pk-field declared, which is no

[JBoss-user] [Persistence CMP/JBoss] - Re: Unknown-PK Problems...

2004-04-13 Thread sesques
Normally, this should work and is compliant wth the EJB spec. (But if not, keep your version as well, it will be a software mystery ;-) | /** | * The Employee Entity Bean handles the information of an employee. | * @author Karsten Jahn (OrangeOak) | * @version 1.0 | * | *

[JBoss-user] [Persistence CMP/JBoss] - Re: Unknown-PK Problems...

2004-04-13 Thread KarstenTS
Well... what can I say... this works perfectly as well... thank you very much! Being within the EJB spec is a bit more sedative. ;) View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3830279#3830279 Reply to the post :

[JBoss-user] [Persistence CMP/JBoss] - Re: Unknown-PK Problems...

2004-04-12 Thread KarstenTS
Yes, it works perfect by now. Well, in fact, I do have some ForeignKey Problems, but that's a different story... ;) This is the solution: ejb-jar.xml | entity | description![CDATA[The Employee Entity Bean saves every Employee.]]/description |

[JBoss-user] [Persistence CMP/JBoss] - Re: Unknown-PK Problems...

2004-04-12 Thread sesques
Normally, when the key is auto-generated byt the database, the prim-key-class should be java.lang.Object without declaring the primkey-field (like in your first version of ejb-jar.xml) + No getters and setters defined on the CMP field employeeID (because you must use the findbyPrimaryKey method

[JBoss-user] [Persistence CMP/JBoss] - Re: Unknown-PK Problems...

2004-04-11 Thread sesques
For MySQL, you mus set entity-command name=mysql-get-generated-keys / View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3830104#3830104 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3830104

[JBoss-user] [Persistence CMP/JBoss] - Re: Unknown-PK Problems...

2004-04-11 Thread mpforste
I do have it - in the defaults section entity-command name=mysql-get-generated-keys class=org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand/ View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3830116#3830116 Reply to the post :

[JBoss-user] [Persistence CMP/JBoss] - Re: Unknown-PK Problems...

2004-04-11 Thread mpforste
And btw The Primary key is working correctly without using the Unknown-PK We are using the mysql-connector-java-3.1.1-alpha-bin.jar and configuring the settings as follows ejb-nameTransTypeBean/ejb-name

[JBoss-user] [Persistence CMP/JBoss] - Re: Unknown-PK Problems...

2004-04-11 Thread sesques
Hi, So, is your problem solved ? I really don't understand how you can make a database generated key without an unknown primary key. I don't know mySQL, just Oracle and MSSQL, and I have many projecs working with database generated keys using the unknown-pk. Are you sure it is the database

[JBoss-user] [Persistence CMP/JBoss] - Re: Unknown-PK Problems...

2004-04-08 Thread sesques
Hi, You are missing a entity-command name tag in your jbosscmp-jdbc.xml. This tag is database dependent (used to get the last generated primary key. For MSSQL, you must set entity-command name=mssql-fetch-key / View the original post :