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 [EjbModule] Deploying FaqEJB | 00:40:53,000 INFO [FaqModule] Creating | 00:40:53,000 INFO [FaqModule] Created | 00:40:53,140 ERROR [EntityContainer] Starting failed | org.jboss.deployment.DeploymentException: | Role: faq-has-faqCategory with multiplicity many | using foreign-key mapping is not allowed to have key-fields | at | org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.loadKeyFields | (JDBCRelationshipRoleMetaData.java:415) | at | org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.init | (JDBCRelationshipRoleMetaData.java:188) | at | org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationMetaData.<init> | (JDBCRelationMetaData.java:339)... 15:15:47,640 ERROR [EntityContainer] Starting failed | org.jboss.deployment.DeploymentException: | Role 'faqCategory-has-faqs' on Entity Bean 'FaqCategoryEJB' : | CMP field for key not found: field name='id' | at | org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.loadKeyFields | (JDBCRelationshipRoleMetaData.java:432) | at | org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.init | (JDBCRelationshipRoleMetaData.java:188).... 15:39:29,328 ERROR [EntityContainer] Starting failed | org.jboss.deployment.DeploymentException: | At least one role of a foreign-key mapped relationship must have key fields | (or <primkey-field> is missing from ejb-jar .xml): | ejb-relation-name=Faq-FaqCategory | at | org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationMetaData.<init> | (JDBCRelationMetaData.java:347)... I am working on a proof-of-concept for migrating the backend of JBossNukes to a pure-CMP/pure-CMR architecture. Currently, Nukes uses entity EJBs merely for selects and updates; it uses lots of database-dependent DDL to create, initialize, and drop the tables :-( !! How can we call this Nukes on JBoss ?? The installation process is at least triple as complex as it needs to be; take a glance at my wiki about installing Nukes at: http://jboss.org/wiki/Wiki.jsp?page=InstallUninstallUpgrade A pure-CMP approach would simplify installation greatly and allow us to gain a much larger user & contributor base. I am working on architecting a complete overhaul of this backend aspect of Nukes. Even though I haven't posted my main materials yet, you can see some of my preliminary posts on this subject: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=45576 And the last 3 posts of: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=44058 The fruits of my effort will all be contributed to JBossNukes as a set of templates for migrating all the modules. During the next few days, I will be starting several wikis and forum threads on these subjects, but I really would like to have a clean proof-of-concept to launch the discussions. My other unknown-pk entities, having no CMR, work fine.... but I need to show CMR working in order to show that this approach is ready for prime time. So my initial post was to find out if there are well-known bugs in xdoclet's CMR or unknown-pk code generation, or in JBossCMP's implementation of CMR with unknown-pk. If you want me to post the dozen+ variations of code that I have tried, I'll pull that together and post em... but first, perhaps there is a simple answer that I am ignorant of or overlooking... Or perhaps somebody has something similar to the code already posted on this thread, but with CMR xdoclet tagging... it would be great if you could post a sample of working entity ejb code which contains xdoclet tags for unknown-pk, as well as xdoclet tags for at least one CMR field? Such as 2 related entities, each using unknown-pk for its own PK, and each having a CMR field for its relation with the other entity? -- Howard View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3832058#3832058 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3832058 ------------------------------------------------------- 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
