When you define a cmr field, you don't need to define a cmp field for that field. If you do, the container will treat it as a BLOB and persist the serialized object. Pretty neat. But doesn't do what you want with the relationships.
Weird; I do that and jboss makes no blobs in my database. Say I have an Author EJB and an Article EJB - one-to-many relationship. Then, I declare the appropriate fields, "author" is a local interface type field in Article EJB, and "publications" is a collection field in Author EJB. Then I declare the relation, declaring "author" and "publications" to be the CMR-fields. No blobs in the database (PostgreSQL and MySQL), and jboss even creates the appropriate many-to-many-relation tables when need be (that is, when creatig many-to-many relationships), FK fields are created and used as appropriate, and everything seems to work the way it's supposed to work, at least according to everything I've read on the subject.
How come jboss makes blobs when you do this? I use JDeveloper 9031 to create all my beans and descriptors.
Wow someone replied! Yeah I figured it out. I had the CMR fields declared in the CMP section of my descriptor too. I did my descriptors by hand... oops.
Thanks for answering.
> I did my descriptors by hand...
In MS world you have dll-hell, in the java-world you have xml-hell :-)