-
1. Re: Post create CMR relation problem
scottw512 Nov 30, 2002 1:08 PM (in response to muneendra78)This is a known issue with jboss. There's a workaround patch that may help you. For it to work, your non null cmr fields must also be defined as a cmp field. You also have to pass the interface for the relation entity into ejbCreate for each non-nullable field. The patch invokes the getter method on the interface to retrieve the field's value and sets it in the bean instance before the sql insert statement parameters are bound from it.
The patch is at https://sourceforge.net/tracker/index.php?func=detail&aid=644394&group_id=22866&atid=376687 -
2. Re: Post create CMR relation problem
erik777 Dec 5, 2002 11:11 PM (in response to muneendra78)Is this patch included in JBoss 3.0.4? I'd really like to avoid compiling the source and linking in Tomcat if at all possible.
-
3. Re: Post create CMR relation problem
erik777 Dec 5, 2002 11:15 PM (in response to muneendra78)Since 3.0.4 is dated Nov 11, and the patch is dated Nov 26th, I presume that 3.0.4 does not include the patch. Any chance we can get a 3.0.5 bound with Tomcat with the patch included?
-
4. Re: Post create CMR relation problem
scottw512 Dec 11, 2002 2:15 PM (in response to muneendra78)I think that the 4.0 release is already in the process of fixing this.
-
5. Re: Post create CMR relation problem
dsundstrom Dec 11, 2002 2:47 PM (in response to muneendra78)Foreign keys as part of a primary key is support in 4.0 thanks to Alexy.
-
6. Re: Post create CMR relation problem
erik777 Dec 11, 2002 11:08 PM (in response to muneendra78)Why? Is Alexy intentionally against the concept of using foreign keys in primary keys?
The patch posted looks simple and like it works. It simply removes duplicates created when CMR and CMP fields are selected. There is a reason why JBoss should want to select the same field twice in SQL? Can get this in JBoss 3.0.x? This is critical!
It is unrealistic to try to require that we not have foreign keys in primary keys. Some of us have data structures we need to support, either because it is already in production, or because other systems need to access the same data.
If Alexy believes that foreign keys in primary keys is not ideal, then he should preach it without forcing it into an application server that is just beginning to obtain a good reputation in the mainstream.
Lack of support for diverse customer needs is one thing that IT departments are concerned about. Those of us already using it are likely to be less vocally supportive because we don't want to be responsible for projects being delayed. -
7. Re: Post create CMR relation problem
erik777 Dec 12, 2002 1:27 AM (in response to muneendra78)I misread the post by dsundstrom, so please ignore the rant of last post.
-
8. Re: Post create CMR relation problem
jwhiteside Dec 16, 2002 1:43 PM (in response to muneendra78)Has anyone applied this patch? I have successfully applied it, but the duplicate column name still exists.