RE: Advanced OR mapping
In general, no modifications are needed for mappings. Orion will properly build orion-ejb.jar.xml for you based on 1-1, 1-n or n-n mapping specified in your tags. The only time you need to modify orion-ejb-jar.xml is when you are trying to write a "crafty" finder and since orion does not fully support EJB-QL, you would need to write the SELECT statement yourself in the orion-ejb-jar.xml. How about, describe two entities, that you want to relate to each other,and the kind of relationship you want, and I will tell you step by step of what's needed to get it to work in Orion. -AP_ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Joerg Weishaupt Sent: Wednesday, May 02, 2001 8:13 AM To: Orion-Interest Subject: AW: Advanced OR mapping Hi Alex, thanks for your reply. Actually maybe I've overseen something, but as I read in the article "Advanced Object-Relational mapping" I thought I have to do some modifications within orion-ejb-jar.xml directly which resulted in a lot of error messages. It would be great if you could point me to some documentation about what I have to do for a reference mapping as well as for collections. Or may be you can give me an example. TIA Joerg -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Alex Paransky Gesendet: Montag, 30. April 2001 20:05 An: Orion-Interest Betreff: RE: Advanced OR mapping I have been able to do amazing things with Orion's OR mapping. What specific problem are you having? As you have described: Product -> ProductType Product -> Supplier -> Country Product -> Packing Unit Attribute -> AttributeType Media -> MediaType Price -> Currency Price -> ClientType Price -> SalesTax Are all unidirectional relationships and are supported directly by Orion. The finders such as findProductsBy(ProductType), findProductsBySupplier(Supplier) and findProductsBy(PackingUnit) are directly supported by orion using EJB-QL (supplier = ?1, for example). Product -> Attribute(s) Product -> Price(s) Product -> Media(s) Product -> AccessoryProduct(s) (Product and AccessoryProduct as two different ejbs) is a 1-n relationship, and is also directly supported by Orion (in ejb-jar.xml). I belive all of these are supported by Orion, and you can write finder methods for any of these using orion-ejb-jar.xml. Please note that some of the more complicated finder methods are NOT supported through ejb-jar.xml (because ORION does not implement full EJB-QL, however, you can always use orion-ejb-jar.xml to do such a find). Here is an example of a more complicated finder that I have manged to get working: com.indnet.symbiosis.model.entity.Interest findParentByChild com.indnet.symbiosis.model.entity.interest.InterestEntity This method will find a parent for a child in a tree (circular relationship through external nodes). -AP_ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Joerg Weishaupt Sent: Sunday, April 29, 2001 10:42 AM To: Orion-Interest Subject: Advanced OR mapping Hi, I'm having some problems with the OR mapping, especially for entity bean reference mappings. Although I've gone thru the "Advanced Object-Relational mapping" topic on orionsuppurt.com, I'm unable to transfer this to our object model, i.e.: EJB Product has references to - ProductType - Supplier which references to - Country - PackingUnit and also has Collections of - Attributes which references to - AttributeType - Prices which references to - Currency - ClientType - SalesTax - Medias which references to - MediaType - AccessoryProducts which are of the same type as the Product itself. So it's quite complicated and maybe someone can give me some directions of what to do. For me it's very important to see, whether for this model Orion CMP works better (in regard to performance) than the existing BMP, as I've seen that it's faster for simple EJB's TIA Joerg
AW: Advanced OR mapping
Hi Alex, thanks for your reply. Actually maybe I've overseen something, but as I read in the article "Advanced Object-Relational mapping" I thought I have to do some modifications within orion-ejb-jar.xml directly which resulted in a lot of error messages. It would be great if you could point me to some documentation about what I have to do for a reference mapping as well as for collections. Or may be you can give me an example. TIA Joerg -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Alex Paransky Gesendet: Montag, 30. April 2001 20:05 An: Orion-Interest Betreff: RE: Advanced OR mapping I have been able to do amazing things with Orion's OR mapping. What specific problem are you having? As you have described: Product -> ProductType Product -> Supplier -> Country Product -> Packing Unit Attribute -> AttributeType Media -> MediaType Price -> Currency Price -> ClientType Price -> SalesTax Are all unidirectional relationships and are supported directly by Orion. The finders such as findProductsBy(ProductType), findProductsBySupplier(Supplier) and findProductsBy(PackingUnit) are directly supported by orion using EJB-QL (supplier = ?1, for example). Product -> Attribute(s) Product -> Price(s) Product -> Media(s) Product -> AccessoryProduct(s) (Product and AccessoryProduct as two different ejbs) is a 1-n relationship, and is also directly supported by Orion (in ejb-jar.xml). I belive all of these are supported by Orion, and you can write finder methods for any of these using orion-ejb-jar.xml. Please note that some of the more complicated finder methods are NOT supported through ejb-jar.xml (because ORION does not implement full EJB-QL, however, you can always use orion-ejb-jar.xml to do such a find). Here is an example of a more complicated finder that I have manged to get working: com.indnet.symbiosis.model.entity.Interest findParentByChild com.indnet.symbiosis.model.entity.interest.InterestEntity This method will find a parent for a child in a tree (circular relationship through external nodes). -AP_ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Joerg Weishaupt Sent: Sunday, April 29, 2001 10:42 AM To: Orion-Interest Subject: Advanced OR mapping Hi, I'm having some problems with the OR mapping, especially for entity bean reference mappings. Although I've gone thru the "Advanced Object-Relational mapping" topic on orionsuppurt.com, I'm unable to transfer this to our object model, i.e.: EJB Product has references to - ProductType - Supplier which references to - Country - PackingUnit and also has Collections of - Attributes which references to - AttributeType - Prices which references to - Currency - ClientType - SalesTax - Medias which references to - MediaType - AccessoryProducts which are of the same type as the Product itself. So it's quite complicated and maybe someone can give me some directions of what to do. For me it's very important to see, whether for this model Orion CMP works better (in regard to performance) than the existing BMP, as I've seen that it's faster for simple EJB's TIA Joerg
RE: Advanced OR mapping
I have been able to do amazing things with Orion's OR mapping. What specific problem are you having? As you have described: Product -> ProductType Product -> Supplier -> Country Product -> Packing Unit Attribute -> AttributeType Media -> MediaType Price -> Currency Price -> ClientType Price -> SalesTax Are all unidirectional relationships and are supported directly by Orion. The finders such as findProductsBy(ProductType), findProductsBySupplier(Supplier) and findProductsBy(PackingUnit) are directly supported by orion using EJB-QL (supplier = ?1, for example). Product -> Attribute(s) Product -> Price(s) Product -> Media(s) Product -> AccessoryProduct(s) (Product and AccessoryProduct as two different ejbs) is a 1-n relationship, and is also directly supported by Orion (in ejb-jar.xml). I belive all of these are supported by Orion, and you can write finder methods for any of these using orion-ejb-jar.xml. Please note that some of the more complicated finder methods are NOT supported through ejb-jar.xml (because ORION does not implement full EJB-QL, however, you can always use orion-ejb-jar.xml to do such a find). Here is an example of a more complicated finder that I have manged to get working: com.indnet.symbiosis.model.entity.Interest findParentByChild com.indnet.symbiosis.model.entity.interest.InterestEntity This method will find a parent for a child in a tree (circular relationship through external nodes). -AP_ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Joerg Weishaupt Sent: Sunday, April 29, 2001 10:42 AM To: Orion-Interest Subject: Advanced OR mapping Hi, I'm having some problems with the OR mapping, especially for entity bean reference mappings. Although I've gone thru the "Advanced Object-Relational mapping" topic on orionsuppurt.com, I'm unable to transfer this to our object model, i.e.: EJB Product has references to - ProductType - Supplier which references to - Country - PackingUnit and also has Collections of - Attributes which references to - AttributeType - Prices which references to - Currency - ClientType - SalesTax - Medias which references to - MediaType - AccessoryProducts which are of the same type as the Product itself. So it's quite complicated and maybe someone can give me some directions of what to do. For me it's very important to see, whether for this model Orion CMP works better (in regard to performance) than the existing BMP, as I've seen that it's faster for simple EJB's TIA Joerg
Advanced OR mapping
Hi, I'm having some problems with the OR mapping, especially for entity bean reference mappings. Although I've gone thru the "Advanced Object-Relational mapping" topic on orionsuppurt.com, I'm unable to transfer this to our object model, i.e.: EJB Product has references to - ProductType - Supplier which references to - Country - PackingUnit and also has Collections of - Attributes which references to - AttributeType - Prices which references to - Currency - ClientType - SalesTax - Medias which references to - MediaType - AccessoryProducts which are of the same type as the Product itself. So it's quite complicated and maybe someone can give me some directions of what to do. For me it's very important to see, whether for this model Orion CMP works better (in regard to performance) than the existing BMP, as I've seen that it's faster for simple EJB's TIA Joerg
CMP, advanced OR mapping?
All, If an entity bean has more than one dependent object, do all corresponding tables have to be linked by the parent tables primary key? For instance, I have a ContractEJB that has a primarykey of contractId. The ContractEJB also has an Agency object and agency code that is an id into an agency table. Can multiple keys like this be mapped in orion-ejb-jar.xml? TIA. John Hogan _ Get your free E-mail at http://www.ireland.com
Advanced OR-Mapping
Hello, I've a problem with orion and the advanced O-R mapping. I use Orion V1.43 with MS ACCESS and the sun.jdbc.odbc.JdbcOdbcDriver. When I try to map a customer EntityBean(CMP) to an AddressBean (PK = Integer) (one to one) the database tables will create correctly (an integer field name in the customer table). When I try to create a Customer Bean with create(primaryKey), the jdbc-odbc Driver throws an exception: MSACCESS ODBDriver: Optional Feature not supported! What can I do? Does MSAccess not support the advanced OR-Mapping with Orion?