Hi, Lachezar,
you always have a workable alternative - just to turn your object instance
into byte array . This is the first step I recommend while doing 1-M
OR-mapping. Then I try to figure out how "deep" my <map-mapping> should be.
Because it is a lot of "dirty" error-prone work on your 'orion-ejb-jar'
files. I mean admitting that the final solution may be a mix of OR-mapping
and serialization. Don't disregard the latter. I use cloudscape ORDMS where
implicit java-object serialization is supported. Again I didn't encounter
any problem with orion or-mapping, although my experience is limited.
Regards, Victor
-----Original Message-----
From: Lachezar Dobrev [SMTP:[EMAIL PROTECTED]]
Sent: ? 04 ???? 2001 10:36
To: Orion-Interest
Subject: Advanced OR_Mapping 1-to-N-to-N possible?
I have this situation:
class Enterprise1Bean implements EntityBean {
public java.util.Vector elements;
public static final Class elements_type =
Normal_Java_Bean1.class;
public void setElements(java.util.Vector newElements){
elements = newElements;
}
public java.util.Vector getElements(){
return elements;
}
/*********************
* Other EJB methods *
*********************/
}
class Normal_Java_Bean1 {
public java.util.Vector elements;
public static final Class elements_type =
Normal_Java_Bean2.class;
public void setElements(java.util.Vector newElements){
elements = newElements;
}
public java.util.Vector getElements(){
return elements;
}
}
class Normal_Java_Bean2 {
public String text;
public void setText(String newText){
text = newText;
}
public String getText(){
return text;
}
}
Now I want to map everything in an 1-to-N-to-N or-mapping.
That means... What you see... An EJB has a Vector of elements,
which have
other Vectors of other Elements.
Trying to deploy that I receive a NullPointerException ( I think
it's
while creating the table for the Normal_Java_Bean2, beacause
Normal_Java_Bean1 has no primary key to map into).
Tried Map-Mapping, because there is a primary key, to no avail
however:
<map-mapping> can only be used on the types java.util.Map,
java.util.Hashtable, java.util.Properties (not Normal_Java_Bean1)
HELP!
Lachezar