|
Replies:
13
-
Last Post:
May 6, 2006 12:28 AM
by: ss141213
|
|
|
|
|
|
|
Entity mapping ManyToMany fails on inherited class
Posted:
Apr 12, 2006 12:31 PM
|
|
|
Hi,
I don't know if I do something wrong, but I get this error:
The map key [ida] on the entity class [class com.seryx.test.AA] could not be found for the mapping [oracle.toplink.essentials.mappings.ManyToManyMapping[aas]].
Local Exception Stack:
Exception [TOPLINK-7159] (Oracle TopLink Essentials - 2006.3 (Build 060327)): oracle.toplink.essentials.exceptions.ValidationException
Exception Description: The map key [ida] on the entity class [class com.seryx.test.AA] could not be found for the mapping [oracle.toplink.essentials.mappings.ManyToManyMapping[aas]].
at oracle.toplink.essentials.exceptions.ValidationException.couldNotFindMapKey(ValidationException.java:1805)
The test case is simple: 3 classes, A, AA and B. AA inherits from A and there is a collection mapping between B and AA. The code is:
**************
Class A
**************
@Entity
@Table(name = "A")
@Inheritance(strategy = InheritanceType.JOINED)
@DiscriminatorColumn(name = "DISCRIMINATOR", discriminatorType = DiscriminatorType.STRING, length = 3)
@DiscriminatorValue("A")
public class A {
private short ida;
public A() {
}
public A(short ida) {
this.ida = ida;
}
@Id
@Column(name="IDA")
public short getIda() {
return ida;
}
public void setIda(short ida) {
this.ida = ida;
}
}
**************
Class AA
**************
@Entity
@Table(name = "AA")
@PrimaryKeyJoinColumn(name = "IDAA")
@DiscriminatorValue("AA")
public class AA extends A {
private Set bs;
public AA() {
super();
}
public AA(short ida) {
super(ida);
}
public AA(short ida, Set bs) {
super(ida);
this.bs = bs;
}
@ManyToMany(mappedBy = "aas")
public Set getBs() {
return bs;
}
public void setBs(Set bs) {
this.bs = bs;
}
}
**************
Class B
**************
@Entity
@Table(name = "B")
public class B {
private short idb;
private Set<AA> aas;
public B() {
}
public B(short idb) {
this.idb = idb;
}
public B(short idb, Set<AA> aas) {
this.idb = idb;
this.aas = aas;
}
@Id
@Column(name = "IDB")
public short getIdb() {
return idb;
}
public void setIdb(short idb) {
this.idb = idb;
}
@ManyToMany
@JoinTable(name = "AA_B", joinColumns = { @JoinColumn(name = "IDB") }, inverseJoinColumns = { @JoinColumn(name = "IDAA") })
public Set<AA> getAas() {
return aas;
}
public void setAas(Set<AA> aas) {
this.aas = aas;
}
}
I'm doing tests both on JBoss and GlassFish and works on JBoss.
Any idea?
|
|
|
|
|
|
|
Re: Entity mapping ManyToMany fails on inherited class
Posted:
Apr 14, 2006 3:58 AM
in response to: rnicob
|
|
|
looks like a bug to me. I have filed https://glassfish.dev.java.net/issues/show_bug.cgi?id=578 and added you to interest list. Thanks for reporting the issue.
Please add any other information that you have, like what worked and when you started seeing this issue. That may expedite the process of getting a resolution.
Thanks, Sahoo
|
|
|
|
|
|
|
|
Re: Entity mapping ManyToMany fails on inherited class
Posted:
May 2, 2006 7:47 AM
in response to: ss141213
|
|
|
In my inheritance situation, this is still broken in Build 47 (2006-05-01), even though the fix was checked in 2006-04-26. How long does it take for a fix to appear in a build? Or do I need to file another issue?
Thanks,
Cay
|
|
|
|
|
|
|
|
Re: Entity mapping ManyToMany fails on inherited class
Posted:
May 2, 2006 8:20 AM
in response to: cayhorstmann
|
|
|
Hi,
There is a lot of confusion here. Issue #578 does not say which the build contains the fix. It is only natural to expect it to be in b47. However b47 is a build done using source from CVS branch named SJSAS90_FCS_BRANCH. The fix for issue #578 was checked into the trunk as shown by the following page: http://fisheye5.cenqua.com/changelog/glassfish?cs=MAIN:tware:20060427165135
There is no promoted build happenning on the trunk. So, the latest nightly builds from the trunk has to be used. I was about to point you to the nightly location, but I am confused seeing the names of the nightly build. It contains b43. It is not clear which is the latest nightly build on the trunk. I, being a developer don't use the nightly build location page. So, I will ask someone who knows about that web page and get back. I guess the latest nightly is http://download.java.net/javaee5/installer-nightly/SunOS/glassfish-installer-b43-nightly-01_may_2006.jar You can try to use it in the mean while.
Thanks, Sahoo
|
|
|
|
|
|
|
|
|
|
Re: Entity mapping ManyToMany fails on inherited class
Posted:
May 4, 2006 8:57 PM
in response to: ss141213
|
|
|
I am sorry--I don't get it. I just downloaded b48, and the bug wasn't fixed. What's the use of fixing it in a b43 nightly release but not in the next regular build?
I thought these "advanced" builds that are coming fast and furious now are supposed to address critical bugs. Is this not a critical bug? It seems like a whopper to me.
Thanks,
Cay
|
|
|
|
|
|
|
|
Re: Entity mapping ManyToMany fails on inherited class
Posted:
May 4, 2006 10:43 PM
in response to: cayhorstmann
|
|
|
Hi Cay,
I can understand your confusion and frustration. There has been a P1 issue (#640) filed to promote builds from trunk.
> I just downloaded b48, > and the bug wasn't fixed.
I did mention that b47is done using source code from SJSAS90_FCS_BRANCH in CVS where as the bug was fixed in the trunk in CVS. Same is the case with b48. SJSAS90_FCS_BRANCH branch is a special branch used by Sun to release Sun Java System Application Server 9.0 PE. That branch is in a high resistance mode, so not all fixes are made into that branch. The code from trunk will be used in a release subsequent to 9.0. Don't expect these bugs to be fixed in b48.
> What's the use of fixing it > in a b43 nightly release but not in the next regular > build? > Don't get confused with the build number. Although it says b43, it's the date that matters. So I asked you to download the latest dated nightly build.
> I thought these "advanced" builds that are coming > fast and furious now are supposed to address critical > bugs. Is this not a critical bug? It seems like a > whopper to me.
Yes, these bugs are critical, but then application server has many modules and given that persistence spec version is 1.0, a product is bound to have some bugs. So, all these bugs which are being fixed in trunk will eventually be used in an update release (UR) which will come out soon after 9.0.
Does it reduce the confusion? One of us from Sun will soon post a note clarifying the confusion about build numbers.
Thanks, Sahoo
|
|
|
|
|
|
|
|
|
|
Re: Entity mapping ManyToMany fails on inherited class
Posted:
May 5, 2006 3:41 AM
in response to: ss141213
|
|
|
Sahoo,
There doesn't seem to be a nightly done for each os. For example at the moment the last nightly for windows is the 1st May whereas Solaris/Linux its the 4th May.
Any chance there would be a list showing which bugs are fixed on which days ?
Then if testing on Windows and needed a bug fixed on the 4th I could just wait for the next nightly build.
Regards, Mark.
> Cay, > > I just blogged about this here: > > http://weblogs.java.net/blog/ss141213/archive/2006/05/ > which_glassfish.html > > Does it help? > > Sahoo
|
|
|
|
|
|
|
|
Re: Entity mapping ManyToMany fails on inherited class
Posted:
May 5, 2006 4:14 AM
in response to: markbrazil
|
|
|
I have escalated the non-availability of Windows nightly since 1 May to release engineering team. Will keep you informed.
We are working on having a list of bugs and features integrated for each promoted build. It will happen soon.
About tracking bugs for a nightly build: It is possible, but the necessary process is not enforced yet. We already have a check in template that engineers are supposed to fill for every check in and one of the entry in the template is the issue number. If committers always populate that field, then one can run some scripts in CVS log files to extract the necessary information. Unfortunately, this process is not enforced yet. Hopefully as time goes by, we can enforce it. In the mean while, you can use http://fisheye5.cenqua.com/changelog/glassfish to see what changes are being committed and from there try to find out if the fix of your interest is made or not.
Sahoo
|
|
|
|
|
|
|
|
|
|
Re: Entity mapping ManyToMany fails on inherited class
Posted:
May 5, 2006 7:27 PM
in response to: ss141213
|
|
|
Thank you.
> I have escalated the non-availability of Windows > nightly since 1 May to release engineering team. Will > keep you informed. > > We are working on having a list of bugs and features > integrated for each promoted build. It will happen > soon. > > About tracking bugs for a nightly build: It is > possible, but the necessary process is not enforced > yet. We already have a check in template that > engineers are supposed to fill for every check in and > one of the entry in the template is the issue number. > If committers always populate that field, then one > can run some scripts in CVS log files to extract the > necessary information. Unfortunately, this process is > not enforced yet. Hopefully as time goes by, we can > enforce it. In the mean while, you can use > http://fisheye5.cenqua.com/changelog/glassfish to see > what changes are being committed and from there try > to find out if the fix of your interest is made or > not. > > Sahoo
|
|
|
|
|
|
|
|
Re: Entity mapping ManyToMany fails on inherited class
Posted:
May 5, 2006 10:20 PM
in response to: ss141213
|
|
|
Hi Sahoo,
thanks for your blog. It clarified the situation a great deal.
Two things. (1) If one goes to https://glassfish.dev.java.net/, there is a section "Builds • Latest Stable: Milestone 6 • Latest Advanced: b48 • Choosing: which one?"
Maybe it would be best to add "Latest Nightly"? Also, the "Choosing: which one?" could be made clearer.
(2) The directory http://download.java.net/javaee5/installer-nightly/Linux/ is a bit of a mess.
(a) What's with the xx_apr_2006 naming convention? It sorts poorly. Why not 2006_04_xx? http://en.wikipedia.org/wiki/ISO_8601
(b) What is the v2 stuff? (glassfish-installer-b43-nightly-05_may_2006.jar vs. glassfish-installer-v2-b01-nightly-05_may_2006.jar?)
I am sure it'll all straighten itself out real soon, but it is confusing to be in the fog of war.
Cay
|
|
|
|
|
|
|
|
Make GlassFish builds page better...
Posted:
May 6, 2006 12:28 AM
in response to: cayhorstmann
|
|
|
Hi Cay,
Very good suggestions. Yes, we are trying to make things clearer. I have asked one of the workspace team members to take a not of your valuable input.
Thank you very much, Sahoo
|
|
|
|
|