[JBoss-user] [Persistence & CMP/JBoss] - Won't use manually generated CMP primary keys.

2004-04-22 Thread warmachine
I can create Long primary keys on mySQL using auto-increment fields.  For one table, I 
need to generate the Long number myself.  If I disable auto-increment, I get

getGeneratedKeys returned an empty ResultSet

If I enable auto-increment for the primary key, JBoss ignores the id I set in 
ejbCreate and uses its own.

JBoss is clearly generating the next id for use but I don't want it to.  How do I tell 
JBoss to stop, without resorting to BMP?

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3832020#3832020

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3832020


---
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence & CMP/JBoss] - Re: Relationships and Foreign Keys

2004-04-11 Thread warmachine
I'm working with mpforste on this problem.  Only having tr_type (the foreign key) as a 
cmr-field means when JBoss creates the table in mySQL, the foreign key field is a 
BLOB.  The foreign key is supposed to be a BIGINT and creating transactions fails when 
it is a BIGINT.

When I leave it as a BLOB, code works as I expected, including creating a transaction 
with a transtype object, retrieving an associated transtype from a transaction and 
setting its description, which appears in the transtype table.  In other words, we 
have CMR but using an object reference, not a foreign key field.

Surely this can't be JBoss's method of persisting relationships?  It can't be made to 
use a relational model or have I misconfigured something?  I would prefer to use a 
relational persistence scheme so other reporting tools can read the database.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3830119#3830119

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3830119


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user