-
1. Re: Multi-part primary key - How?
alexb Dec 3, 2002 11:22 AM (in response to cobraflow)Lewis,
I've posted the same quetion and it was never answered so I hope someone will answer your post...
I'm starting to think that jboss dosen't support this switch dosen't make any sense...
Alex -
2. Re: Multi-part primary key - How?
cobraflow Dec 5, 2002 7:58 AM (in response to cobraflow)This has got to be the...second... most simple relationship going!
We need the id column to be both cmp and cmr. If I build the thing with, what I would class as the logical configuration, the only error I get is that the child bean generates an insert statement with the id column occurring twice. If this is 'supposed' to work, I could easily patch the code to look for duplicated column names. I have looked all over for docs on this. The spec does not cover it at all (As it seems to be down to the implementer to supply this part).
Lewis -
3. Re: Multi-part primary key - How?
erik777 Dec 5, 2002 10:55 PM (in response to cobraflow)I have posted the same problem from a different perspective at
http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ there seems to be a problem when a foreign key is part of a primary key. When it is not part of the primary key, I can get around the duplicate column problem by commenting out the individual abstract foreign key get/sets and CMP field definitions. But, this doesn't work when it's part of the primary key, because it needs to select these columns.
I hope we find an answer. This is a show stopper for me. I really don't want to redesign the database just to get around a bug, particularly when I need backward compatibility with a working and in production 2.4 version. -
4. Re: Multi-part primary key - How?
tolborg Jan 16, 2003 12:53 PM (in response to cobraflow)I would also like an answer to these questions.
-
5. Re: Multi-part primary key - How?
lorensrosen Jan 16, 2003 1:49 PM (in response to cobraflow)Given that work has started on version 4, I would guess a backport of this feature to version 2 is unlikely.
I can see one really ugly possible workaround. It would involve adding some new tables and possibly some triggers, so it's not worth persuing unless you can do that to your production database and are getting desperate for workarounds. -
6. Re: Multi-part primary key - How?
tolborg Jan 16, 2003 3:34 PM (in response to cobraflow)So .. its a "fact" that using CMR fields as a part of the primary key in EJBs is not possible in the latest stable version of JBoss?
-
7. Re: Multi-part primary key - How?
lorensrosen Jan 16, 2003 7:01 PM (in response to cobraflow)There are others who can speak more authoritatively but my understanding is that a fix for this is in 3.2, which is currently at Release Candidate status.