Still Probleml with Mapping Inheritance Hierarchies

2004-03-26 Thread Björn Voigt
OK, I have still no solution for my inheritance mapping problem. There are my Classes A,B and C implementing the ABInterface, C and B extend from A. I want to map each class to a distinct tables, but on Multiple Joined Tables. The c an b table have its own primary column b_id and c_id and both

Re: Still Probleml with Mapping Inheritance Hierarchies

2004-03-26 Thread Edson Carlos Ericksson Richter
a sidekick)? Best regards, Edson Richter Björn Voigt wrote: OK, I have still no solution for my inheritance mapping problem. There are my Classes A,B and C implementing the ABInterface, C and B extend from A. I want to map each class to a distinct tables, but on Multiple Joined Tables. The c an b

Mapping two classes two one table

2004-03-25 Thread Guido Beutler
Hi, I've got a small problem. I have a table with many columns. I would like to select only the primary key field with a complex select first. It's like a candidate list. From that I can find the correct value (independen from the database). For the correct value I would like to receive all

Re: Mapping two classes two one table

2004-03-25 Thread Jakob Braeuchi
hi guido, use a report-query to retrieve the pks only. hth jakob Guido Beutler wrote: Hi, I've got a small problem. I have a table with many columns. I would like to select only the primary key field with a complex select first. It's like a candidate list. From that I can find the correct

Re: Mapping two classes two one table

2004-03-25 Thread Guido Beutler
Hi jakob, Thanks for the fast reply! works fine but one shot question: How do I get the values (colums) from the object ? At the test cases I found only asserts on the size of the collection. Of course I would like to get the values. Thanks in Advance!! best regards, Guido Jakob Braeuchi

Re: Mapping two classes two one table

2004-03-25 Thread Edson Carlos Ericksson Richter
The result of a report query is a Object [], where each element represents a row from the database, and is a Object[] (one value for each field returned). Best regards, Edson Richter Guido Beutler wrote: Hi jakob, Thanks for the fast reply! works fine but one shot question: How do I get the

Packed Field (DB2/400) Mapping

2004-03-23 Thread Jay Xu
Hello, I am having a problem with OJB mapping of DB2/400 Packed Field. I mapped Packed Field in DB2/400 to DECIMAL with Java type BigDecimal. When I read records from database, it is fine. But when I try to update the record using OJB, it generates a SQL with that Packed Filed as null value

RE: 1 to 1 mapping

2004-03-22 Thread McCaffrey, John G.
So, is there any way I can I configure my mapping (or query) to build an Object A that contains a collection of Object Bs joined only on Node_ID (even though both mappings have other PKs)? I don't really get why all the primary keys have to be the collection/reference-descriptor. I just don't

Re: 1 to 1 mapping

2004-03-19 Thread Armin Waibel
mapping has the Table A object containing a collection of B obj ok, you have an 1:n reference from A to B, thus your collection-descriptor should look like class-descriptor for A ... collection-descriptor name=allBs element-class-ref=B proxy=false auto-retrieve=true inverse-foreignkey field

RE: 1 to 1 mapping

2004-03-19 Thread McCaffrey, John G.
be used for a join) How can I configure my mapping (or query) to build an Object A that contains a collection of Object Bs joined only on Node_ID? I could just munge the mapping and make only the Node_ID the primary Key for both A and B, but I am concerned about the consequences of not telling OJB

1 to 1 mapping

2004-03-18 Thread McCaffrey, John G.
I am trying to join two tables A and B table A has three primary keys Main_ID Node_ID Process_Date table B has two primary keys Node_ID Process_Date my mapping has the Table A object containing a collection of B obj I want to join the collection using the Node_ID, because it is the only thing

Re: 1 to 1 mapping

2004-03-18 Thread Edson Carlos Ericksson Richter
, March 18, 2004 4:33 PM Subject: 1 to 1 mapping I am trying to join two tables A and B table A has three primary keys Main_ID Node_ID Process_Date table B has two primary keys Node_ID Process_Date my mapping has the Table A object containing a collection of B obj I want

mapping one class with simple types to two tables

2004-03-17 Thread Oliver
Hi, What's the best way doing the following using ODMG: I have a class with various fields. The fields have simple types. The values of the fields are stored in two tables (like in the tutorial for mapping 1:1 associations). But in the tutorial one object (Article) holds a reference to another

Re: Mapping composite collections

2004-03-12 Thread Laurie Harper
private int position; private long time; } private ListEntry practiceResults; private ListEntry raceResults; } So, mapping Results.Entry would be no problem but how do I map Results itself? I'd rather be able to materialise an instance of Results directly, rather than have

Mapping composite collections

2004-03-11 Thread Laurie Harper
; } So, mapping Results.Entry would be no problem but how do I map Results itself? I'd rather be able to materialise an instance of Results directly, rather than have to do a pair of collection queries on Results.Entry and build a Results instance from them... Am I stuck with mapping Results.Entry

Re: Unique key constraint violations with M-to-N Mapping

2004-03-08 Thread Peter Wieland
Once again me, I want to propose a patch for the proble described below. As I tried to describe, the fact, that a object is newly created does not imply that there are no entries in a m-to-n-indirection-table in the db. Consequently I propose to replace the following code in

Unique key constraint violations with M-to-N Mapping

2004-03-08 Thread Axel Hohaus
Hi all, we have problems saving m:n relations. We get constraint violations. Have a look at ojb-user list entry written by Peter Wieland. I've changed code in the method storeCollectionObject of PersistenceBrokerImpl. Now it works fine. There is a comment describing problems with FK violation

Unique key constraint violations with M-to-N Mapping

2004-03-07 Thread Peter Wieland
Hi all, since I updated from rc4 to CVS HEAD (friday afternoon) I have problems using non decomposed M-to-N relations. In the following scenario, I get unique key constraint violations in the indirection table: Let's say, we have the following: Person(0..*)(0..*)Project I create a new

Mapping Inheritance

2004-03-03 Thread Muhammad Aamir
How can we implement inheritance with one table for each class and tables are joined with foreign key (no duplicating columns) Thank you, Muhammad Aamir Senior Software Engineer Karachi International Container Terminal Tel: (9221) 2316401-20 Fax: (9221) 2313816 E-mail: [EMAIL PROTECTED]

RE: Mapping Inheritance

2004-03-03 Thread Muhammad Aamir
-Original Message- From: Muhammad Aamir Sent: Wednesday, March 03, 2004 3:08 PM To: [EMAIL PROTECTED] Subject: Mapping Inheritance How can we implement inheritance with one table for each class and tables are joined with foreign key (no duplicating columns) Thank you, Muhammad Aamir Senior

OTM M-N Mapping Issue

2004-02-29 Thread David Le Strat
Hello there, I am using OTM with M-N mapping. I am having an issue with OTM, where OJB violate foreign key constraints. I have the following mapping: PREFS_NODE -- PREFS_NODE_PROPERTY_KEY -- PREFS_PROPERTY_KEY With OTM, OJB tries to delete PREFS_PROPERTY_KEY before removing

Re: OTM M-N Mapping Issue

2004-02-29 Thread Oleg Nitz
Hi David, If you use otm-dependent relations, then check the current CVS HEAD - I've just committed the fix. If not, then give more detailed description of your case. Regards, Oleg On Sunday 29 February 2004 08:09, David Le Strat wrote: Hello there, I am using OTM with M-N mapping. I am

Re: OTM M-N Mapping Issue

2004-02-29 Thread David Le Strat
of your case. Regards, Oleg On Sunday 29 February 2004 08:09, David Le Strat wrote: Hello there, I am using OTM with M-N mapping. I am having an issue with OTM, where OJB violate foreign key constraints. I have the following mapping: PREFS_NODE -- PREFS_NODE_PROPERTY_KEY

boolean char mapping

2004-02-26 Thread Guerrero, Axel
I have a table with a varchar2(1) field... this field represents a boolean. I created a conversion filter to convert from Java Boolean to char and vice-versa. The problem is that there is existing data on this field and the data is not consistent (Y is used for true, but 0, N and blank/space

Re: Fw: Problem with inheritance mapping

2004-02-20 Thread Jakob Braeuchi
hi peter, i committed the fix. jakob Peter Wieland wrote: Hi Jakob, the code changes seem to work well. Thank you very much. I'll tell if further problems occur. Thank you for your help, Peter hi peter, please replace the method addJoin in SqlQueryStatement with the following:

Fw: Problem with inheritance mapping

2004-02-18 Thread Peter Wieland
again, Peter --- HIER BEGINNT DIE WEITERGELEITETE NACHRICHT -- Von: [EMAIL PROTECTED] (Peter Wieland) Datum: 16.02.2004, 17:29:33 Betreff: Problem with inheritance mapping Hi everyone, I have two entity classes AddressImpl and PersonAddressImpl, PersonAddressImpl

RE: Problem with inheritance mapping

2004-02-18 Thread Gelhar, Wallace Joseph
, 2004 7:58 AM To: [EMAIL PROTECTED] Subject: Fw: Problem with inheritance mapping Hi, I posted the message below two days ago, and from my experience I would say if there is no reply within two days, there's very few chance to have an answer at all, that's way I annoy you one more time

Re: Fw: Problem with inheritance mapping

2004-02-18 Thread Jakob Braeuchi
PROTECTED] (Peter Wieland) Datum: 16.02.2004, 17:29:33 Betreff: Problem with inheritance mapping Hi everyone, I have two entity classes AddressImpl and PersonAddressImpl, PersonAddressImpl extending AddressImpl (below the interesting parts of my Mapping). A third class - GaragaeImpl - holds

Mapping question

2004-02-16 Thread ftanare
Hello, I want to know if it's possible (and how could I do that) to map this kind of relation in OJB. Table A idA otherFields Table B idB otherFields Table C idC foreignId type otherFields Relation : C - A 1:n C - B 1:n example : A a1 ... a2 ... B b1 ... b2 ... C c1 b1

Re: Mapping question

2004-02-16 Thread BIRGITTA . MOEHRING
Hello Florent, I understand this as a question about the typeB collection or the typeA collection exclusively in the C instance? Then you can't even model this in UML (or so I think), so I don't think you can in OJB. The only workaround I know without having two collections in C is a

Re: Mapping question

2004-02-16 Thread ftanare
My english is not good ;-) What I want is in C object 2 collections one with typeA Object and one with typeB Object. My question is how to do a mapping with OJB that can make this kind of switch on type field. In other word when I load A objects collection of a C object the query is : SELECT

Re: Mapping question

2004-02-16 Thread BIRGITTA . MOEHRING
Hello again, If you want C.foreignId = A.idA then the 1:n - relation between C and A is the other way round: C would be the n-class. But if you simply want C having two collections as attributes, it is described in tutorial 3, mapping 1:n relations. Was that the answer? regards, Birgitta

Building mapping, XDoclet

2004-02-10 Thread David Hooker
From what I gather, there's no way to build a mapping from Java source, except using somethin g like XDoclet, is that correct? If so, where can I find documentation or info on the XDoclet tags to use for creating the OJB mapping file?

RE: Simple 1:n mapping question

2004-01-30 Thread Brendan Richards
holds a foreign key pointing back to a contact, so one Contact can hold many SimplePropertys but a SimplePropery always belongs to one Contact. First setup your mapping XML so that the contact object knows how to populate its collection. (I'm using MS SQL so the key type is varchar in my code

Simple 1:n mapping question

2004-01-29 Thread Rick Banerjee
Hi Everybody, I have a 1:n relationship between Person Application tables. I have Person Application valueobjects representing the tables respectively. I want to search on the join of these tables with criteria pertaining to both tables. In the Person value object I have a Collection

Re: Performance difference between mapping number column to long vs BigDecimal

2004-01-28 Thread Martin Kalén
ZZZ Liu wrote: I am trying to know the performance difference between mapping number column to long vs BigDecimal. I did following test. Just as a side note and not a direct answer to your question: the OJB performance will be very dependent on the RDBMS performance, especially when running

Performance difference between mapping number column to long vs BigDecimal

2004-01-27 Thread ZZZ Liu
Hi, all I am trying to know the performance difference between mapping number column to long vs BigDecimal. I did following test. 1) I loaded over 200k records in the table. 2) I ran a test to retrieve all records in the table as an iterator and then loop over the iterator to get each element

Mapping inheritance

2004-01-26 Thread Ankur Gupta
I am dynamically registering the mappings for a class hierarchy in ojb and have been getting the following exception: java.lang.NullPointerException at org.apache.ojb.broker.metadata.fieldaccess.AnonymousPersistentFieldForIn heritance.copyObjectToObject(Unknown Source) at

Re: Problem with char mapping

2004-01-22 Thread André Charles Legendre
field: jobNum target field type: class java.lang.Long object value class: java.math.BigDecimal object value: 1] null I made the test with Long and with int, problem is the same if in database the column is Numeric. yep, OJB does the mapping as specified by sun and NUMERIC is mapped

RE: Problem with char mapping

2004-01-22 Thread Gelhar, Wallace Joseph
mapping Armin Thnak you for your elements. But what is the good solutions when I want to use char size 1 (as substitute of Boolean) and Long ? Andre Le Mercredi 21 Janvier 2004 18:12, Armin Waibel a écrit : Hi again, A Leg wrote: Armin I use db-ojb-1.0.rc4. ok, in final 1.0 BOOLEAN

Re: Problem with char mapping

2004-01-22 Thread A Leg
Legendre [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 21, 2004 10:36 AM To: OJB Users List Subject: Re: Problem with char mapping Armin Thnak you for your elements. But what is the good solutions when I want to use char size 1 (as substitute of Boolean) and Long ? Andre Le Mercredi 21 Janvier

Re: Problem with char mapping

2004-01-21 Thread A Leg
change as Boolean is not supported) Which version of OJB do you use? mapping is : field-descriptor name=hold column=HOLD jdbc-type=CHAR/ and in postgres the column is bpchar (size 1) I get the following errors (see belo). I have to declare it as String in my java code to get it work. But I would like

Re: Problem with char mapping

2004-01-21 Thread Armin Waibel
does the mapping as specified by sun and NUMERIC is mapped to BigDecimal. regards, Armin Andre Armin Waibel wrote: Hi Andre, A Leg wrote: Hi every body I have a variable name hold declare as char in code. (It was first a Boolean but I change as Boolean is not supported) Which version

1:n mapping - partial (delayed) commit

2004-01-04 Thread Ara Juljulian
Hello, I'm having a problem using ODMG to add a Video and its contained Vector of VideoData objects to a MySQL database. The problem is that the first VideoData object gets written immediately after I commit the transaction. The other VideoData objects, however, don't materialize in the

RE: Mapping Question

2004-01-04 Thread Coup, Robert Muir
Hi Patrick. Is the field doc_id in download_pal_model actually meant to be model_id? Otherwise I am a touch confused :) Also, I assume you've checked out the advanced O/R mapping stuff at http://db.apache.org/ojb/tutorial3.html - if not, do it now! Idea #1: For download - model class

Mapping Question

2004-01-01 Thread Patrick Scheuerer
Hi, Please see the attached image of my data model for reference (I'm sorry for the attachment but it's kind of complicated to describe the scenario otherwise. A picture says more than a thousand words :-) ). How do I map the relationship between pal_model - download and pal_model - document?

Re: Mapping Question

2004-01-01 Thread Patrick Scheuerer
ooops, I guess attachments are not allowed in this mailing list. here's a link to the picture: http://homepage.hispeed.ch/tabalooga/datamodel.jpg the same problem of course also exists for the keyword table. Thank you, Patrick

RE: Suspected Junk Mail: Re: [rc5 / bug / MetadataManager] Memory leak using dynamic mapping o n per thread bases

2003-12-22 Thread Plummer, Greg
dynamic mapping o n per thread bases Hi Roger/Greg, first, thanks for pointing to this bug, it should be fixed now. Get latest from CVS (trunk or OJB_BRANCH_1_0). http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED] gmsgNo=5592 The test case I use is called

Re: Suspected Junk Mail: Re: [rc5 / bug / MetadataManager] Memory leak using dynamic mapping o n per thread bases

2003-12-22 Thread Armin Waibel
. Greg -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Friday, December 19, 2003 12:42 PM To: OJB Users List; Plummer, Greg; Janssen, Roger Subject: Suspected Junk Mail: Re: [rc5 / bug / MetadataManager] Memory leak using dynamic mapping o n per thread bases Hi Roger

Problem with new mapping inheritance solution (multiple joined tables)

2003-12-20 Thread Nadir T.
Hye, I have a problem with new inheritance mapping solution using multiple joined tables, where subclasses have a foreign key to superclass that is different from subclass primary key (solution: primary key + foreign key to superclass). Reading subclass objects works fine, but writing

MtoN Mapping and Ids

2003-12-19 Thread Graham Lounder
Hey all, I've got a question about updating an m to n mapping. As an example lets say I have a User object with associated Roles. In my web page, I have all the fields for the user object and a list of checkboxes for all the different associated Roles. When I get back to my servlet, I can re

Re: [rc5 / bug / MetadataManager] Memory leak using dynamic mapping o n per thread bases

2003-12-19 Thread Armin Waibel
the class name for a class name present in youe repository mapping :)], so best is to execute it in a loop: MetadataManager mm = MetadataManager.getInstance(); // tell the manager to use per thread mode mm.setEnablePerThreadChanges(true); // e.g we

1-n mapping update problem

2003-12-19 Thread Kollivakkam R. Raghavan
We have a situation where we have a 1-n relationship and a wizard interface to create new instances of either. Class book ( id, name category_id category ) Class category ( id name ... ) I have a collection descriptor in the category class for

RE: Mapping problem

2003-12-18 Thread Stephan Wannenwetsch
Hallo Armin, I've changed the mapping and the code but nothing changed. I can't get the Suppliers of an Item ;-(( Mapping now: class-descriptor class=demo.myshop.model.ojb2.Supplier table=OJB_SUPPLIER field-descriptor name=supId column

RE: Mapping problem

2003-12-17 Thread Stephan Wannenwetsch
Hi Armin, I checked it but nothing changed. I also removed all data from the DB-tables but nothing changed, too. Thanks, Stephan -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 6:03 PM To: OJB Users List Subject: Re: Mapping problem

Re: Mapping problem

2003-12-17 Thread Armin Waibel
Hi Stephan, hmm, how does your mapping for demo.myshop.model.ojb2.Supplier look like (nothing changed from your first post)? From your first post class-descriptor class=demo.myshop.model.ojb2.Supplier table=OJB_SUPPLIER field-descriptor name=fk_bpid

RE: Mapping problem

2003-12-17 Thread Stephan Wannenwetsch
Hallo Armin, 1) Nothing changed in mapping for Supplier 2) fk_bpid is the primary key for this class/table, but it is also the foreign key of the 1:1 relationship to BusinessPartner 3) I'm not quite sure if I have to declare a field-descriptor for SUPPLIERID, because in the docs (Advanced O/R

Re: Mapping problem

2003-12-17 Thread Armin Waibel
Hi again, Stephan Wannenwetsch wrote: Hallo Armin, 1) Nothing changed in mapping for Supplier 2) fk_bpid is the primary key for this class/table, but it is also the foreign key of the 1:1 relationship to BusinessPartner I think this is problematic, because the pc object does not declare

RE: Mapping problem

2003-12-17 Thread Stephan Wannenwetsch
Hallo Armin, the insert error has gone, but now I have again the problem with recieving the suppliers from an item. Mapping changed to: class-descriptor class=demo.myshop.model.ojb2.Supplier table=OJB_SUPPLIER field-descriptor name=fk_bpid

Re: Mapping problem

2003-12-17 Thread Armin Waibel
Hi Stephan, Stephan Wannenwetsch wrote: Hallo Armin, the insert error has gone, but now I have again the problem with recieving the suppliers from an item. I mean something like that: Mapping changed to: class-descriptor class=demo.myshop.model.ojb2.Supplier table

Re: Unusual object relation mapping possible with OJB ?

2003-12-16 Thread Stefan Schlösser
Hi Thomas, Sure, I need the link table. I read throught the examples in the link you gave before posting, my problem is that I do not have and don't want to make the relationship explicit on the object level. I.e. Persons or Address do NOT have a collection pointing to the other type. The

FW: Unusual object relation mapping possible with OJB ?

2003-12-16 Thread Mahler Thomas
-Original Message- From: Mahler Thomas Sent: Tuesday, December 16, 2003 2:10 PM To: 'Stefan Schlösser' Subject: RE: Unusual object relation mapping possible with OJB ? Hi Stephan, Hi Thomas, Sure, I need the link table. I read throught the examples in the link

Mapping problem

2003-12-15 Thread Stephan Wannenwetsch
not able to retrieve the related suppliers of an item. I hope someone can help me. Thanks, Stephan Mapping: class-descriptor class=demo.myshop.model.ojb2.Supplier table=OJB_SUPPLIER field-descriptor name=fk_bpid column=FK_BPID

Unusual object relation mapping possible with OJB ?

2003-12-15 Thread Stefan Schlösser
Hi, I would like to know how to describe the following relations in the repository.xml. class Address{ //no reference to Person static long type = 1; long id; String streetName; } class Link{ //links Persons and address by id and type long sourcetype; long sourceid; long targettype; long

RE: Mapping problem

2003-12-15 Thread Gelhar, Wallace Joseph
: Monday, December 15, 2003 4:16 AM To: [EMAIL PROTECTED] Subject: Mapping problem Hallo, I've got a problem retrieving objects from a m:n relationship: Object model: class Supplier; =Collection items; Interface SellableItem; =Collection suppliers; class Product implements SellableItem

RE: Mapping problem

2003-12-15 Thread Thomas Dudziak
blatant advertisment You could make your life a bit easier and try out the XDoclet OJB module which automatically handles inherited fields/references/collections. /blatant advertisment Tom - To unsubscribe, e-mail: [EMAIL

RE: Unusual object relation mapping possible with OJB ?

2003-12-15 Thread Mahler Thomas
for this kind of associations. Please have a look at: http://db.apache.org/ojb/tutorial3.html#Mapping%20m:n%20associations The only thing whcih seems to be a bit non-standard is the usage of attributes sourcetype and targettype. I don't see why such attributes are required? IMO you just need a LINK

[rc5 / bug / MetadataManager] Memory leak using dynamic mapping o n per thread bases

2003-12-15 Thread Janssen, Roger
hi, executing the code below should reproduce the memory leak [of course swap the class name for a class name present in youe repository mapping :)], so best is to execute it in a loop: MetadataManager mm = MetadataManager.getInstance(); // tell the manager to use per

RE: Mapping problem

2003-12-15 Thread Stephan Wannenwetsch
Hallo Wally, I've changed the mapping into: class-descriptor class=demo.myshop.model.ojb2.SellableItem extent-class class-ref=demo.myshop.model.ojb2.ServiceContract / extent-class class-ref=demo.myshop.model.ojb2.Product / /class-descriptor class-descriptor class

RE: Mapping problem

2003-12-15 Thread Stephan Wannenwetsch
Subject: RE: Mapping problem Hi Stephan, Sounds like a sequence manager configuration problem. A PK must be unique within an extent hierarchy, so you cannot use an IDENTITY column for a PK. What sequence manager are you using? Wally -Original Message- From: Stephan Wannenwetsch

RE: Mapping problem

2003-12-15 Thread Stephan Wannenwetsch
Hi Armin, I checked it but nothing changed. I also removed all data from the DB-tables but nothing changed, too. Thanks, Stephan -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 6:03 PM To: OJB Users List Subject: Re: Mapping problem

Bidirectional 1:1 Mapping

2003-12-09 Thread Gary
I am struggling with the following, and have not found any solutions on this forum (a few others with the issue, though). Any new ideas? I have a Person object; it contains child Address objects. The Address table entries have a foreign key back to the Person. I'd like the Person to have a

mapping M:N relation WITH ATTRIBUTES

2003-12-08 Thread Reda Benzair
and my only the solution for me at this time is convert the M:N to 1:N but is bad solution ! -Original Message- From: Leandro Rodrigo Saad Cruz [mailto:[EMAIL PROTECTED] Sent: mercredi 3 décembre 2003 14:40 To: OJB Users List Subject: Re: mapping M:N relation WITH ATTRIBUTES Hi Reda

Re: mapping M:N relation WITH ATTRIBUTES

2003-12-08 Thread Leandro Rodrigo Saad Cruz
M:N mapping can be done using a indirection table to store relational information. In that case OJB uses a class called MtoNImplementor that holds the fk values that must be inserted onto the indirection table. There is a problem if you want to store more data other than the fk values, thats wy

Re: Problem mapping inheritance hierarchy using joined tables for subclasses

2003-12-05 Thread Jakob Braeuchi
-dev. jakob Peter Wieland wrote: hi peter, you could try to define an extent in classdescriptor of Address pointing to PersonAddress. BUT the problem is that extents and super-references do not go together well. you may end up with instances of the wrong class. the support for mapping one class

Problem mapping inheritance hierarchy using joined tables for subclasses

2003-12-04 Thread Peter Wieland
Hi, I try to map two classes Address and PersonAddress (a subclass of Address) using the joined table per sublcass strategy. This is my mapping: class-descriptor class=de.armax.sandbox.entity.Address table=Address field-descriptor autoincrement=true primarykey=true column=adrOID

Re:Problem mapping inheritance hierarchy using joined tables for subclasses

2003-12-04 Thread balza
strategy. This is my mapping: class-descriptor class=de.armax.sandbox.entity.Address table=Address field-descriptor autoincrement=true primarykey=true column=adrOID jdbc-type=VARCHAR name=oID/ field-descriptor column=adrAttribute jdbc-type=VARCHAR name=attribute

RE: Problem mapping inheritance hierarchy using joined tables for subclasses

2003-12-04 Thread Plummer, Greg
Hi Peter, You might want to try declaring PersonAddress as an extend in the class-descriptor for Address (see the Advanced OR Mapping Tutorial on the website). I haven't tried this myself, but I was reading that section of the tutorial last night and I think an extent might solve your problem

Re:Problem mapping inheritance hierarchy using joined tables for subclasses

2003-12-04 Thread Peter Wieland
CACHED TABLE Address ( adrOID VARCHAR(50) NOT NULL, adrAttribute VARCHAR(50), ... PRIMARY KEY (adrOID) ); CREATE CACHED TABLE PersonAddress ( padOID VARCHAR(50) NOT NULL, padAdditionalAttribute VARCHAR(50), ... PRIMARY KEY (padOID) ); The mapping: class

RE: Problem mapping inheritance hierarchy using joined tables for subclasses

2003-12-04 Thread Gelhar, Wallace Joseph
Well Peter, You've exhausted my knowledge. I would guess it is a bug / incompatibility with using the extent class along with the super reference mapping strategy. Any ideas / comments from the contributors? Wally -Original Message- From: Peter Wieland [mailto:[EMAIL PROTECTED] Sent

RE: Problem mapping inheritance hierarchy using joined tables for subclasses

2003-12-04 Thread Peter Wieland
Well, that's what I tried resulting in a StackOverflow error. I guess it has to do with the auto-update, auto-delete and auto-retrieve attributes of the super reference-descriptor in the subclass. Could anyone tell what settings for those attribute are needed/possible for a correct mapping

RE: Problem mapping inheritance hierarchy using joined tables for subclasses

2003-12-04 Thread Gelhar, Wallace Joseph
Hi Peter, Try refresh=false on the super reference. Wally -Original Message- From: Peter Wieland [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 8:50 AM To: [EMAIL PROTECTED] Subject: RE: Problem mapping inheritance hierarchy using joined tables for subclasses Well

RE: Problem mapping inheritance hierarchy using joined tables for subclasses

2003-12-04 Thread Peter Wieland
Try refresh=false on the super reference. Does not work either. I tried refresh=false auto-retrieve=false auto-delete=false auto-update=false on the super reference. But I stell get the StackOverflowError when querying:

RE: Problem mapping inheritance hierarchy using joined tables for subclasses

2003-12-04 Thread Gelhar, Wallace Joseph
] Subject: Problem mapping inheritance hierarchy using joined tables for subclasses Hi, I try to map two classes Address and PersonAddress (a subclass of Address) using the joined table per sublcass strategy. This is my mapping: class-descriptor class=de.armax.sandbox.entity.Address table

Re: Problem mapping inheritance hierarchy using joined tables for subclasses

2003-12-04 Thread Jakob Braeuchi
hi peter, you could try to define an extent in classdescriptor of Address pointing to PersonAddress. BUT the problem is that extents and super-references do not go together well. you may end up with instances of the wrong class. the support for mapping one class to multiple tables needs

Re: Problem mapping inheritance hierarchy using joined tables for subclasses

2003-12-04 Thread Peter Wieland
hi peter, you could try to define an extent in classdescriptor of Address pointing to PersonAddress. BUT the problem is that extents and super-references do not go together well. you may end up with instances of the wrong class. the support for mapping one class to multiple tables needs

non-decomposed mapping and deletions in PB

2003-12-03 Thread Volker Janzen
Hello All, i have the following problem (maybe a configuration problem but i don't know where). Tables: user (id,username) role (id,rolename) userrole (userid,roleid) i use non-decomposed mapping with the PersistenceBroker API and ManageableArrayList. broker.beginTransaction(); broker.store

mapping M:N relation WITH ATTRIBUTES

2003-12-03 Thread Reda Benzair
Hi all, I would like to map an M:N relation WITH ATTRIBUTES but seem to be unable to do it with OJB... By WITH ATTRIBUTES I mean that there is typically some more fields in the indirection table than just foreign keys. Do I have to use 1:N N:1 mapping instead? A dummy example: Table

Re: mapping M:N relation WITH ATTRIBUTES

2003-12-03 Thread Leandro Rodrigo Saad Cruz
PROTECTED] Data: Wed, 3 Dec 2003 13:22:54 +0100 Para: 'OJB Users List' [EMAIL PROTECTED] Assunto: mapping M:N relation WITH ATTRIBUTES Hi all, I would like to map an M:N relation WITH ATTRIBUTES but seem to be unable to do it with OJB... By WITH ATTRIBUTES I mean that there is typically

Re: mapping M:N relation WITH ATTRIBUTES

2003-12-03 Thread Thomas Dudziak
Where would the Comment field be stored in the Java objects ? If you have a separate Java class for the connection between Employees and Companies which contains the Comment field, then you already have manual decomposition (see

1:n Mapping

2003-12-02 Thread Norbert . Woegerbauer
Hello, we need a 1:n mapping where the joining attribute of the parent class is not its primary key. Example: class-descriptor class=at.gv.bmi.ClassA table=TableA field-descriptor name=fieldA column=A jdbc-type=CHAR primarykey=true / field-descriptor name

RE: 1:n Mapping

2003-12-02 Thread Gelhar, Wallace Joseph
this helps, Wally -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 02, 2003 7:02 AM To: [EMAIL PROTECTED] Subject: 1:n Mapping Hello, we need a 1:n mapping where the joining attribute of the parent class is not its primary key. Example: class

RE: 1:n Mapping

2003-12-02 Thread Norbert . Woegerbauer
questions would help me a lot. Thanks, Norbert. -Original Message- From: Gelhar, Wallace Joseph [mailto:[EMAIL PROTECTED] Sent: Dienstag, 02. Dezember 2003 15:31 To: OJB Users List Subject: RE: 1:n Mapping Hi Norbert, I assume that the attribute you want to treat as a primary key is a candidate

RE: Mapping question

2003-12-01 Thread Norbert . Woegerbauer
What do I have to do to get this join? Thanks, Norbert. -Original Message- From: eric barbe [mailto:[EMAIL PROTECTED] Sent: Freitag, 28. November 2003 15:08 To: OJB Users List Subject: RE: Mapping question Hi, I don't really understand you're pb. ;o( Is it : any field from my class A can

RE: Mapping question

2003-11-28 Thread eric barbe
] Objet : RE: Mapping question Thanks, I defined it like that, but: If A is 1 and B is n. In A class descriptor write : collection-descriptor name=relation_name_in_A_class element-class-ref=url.B inverse-foreignkey field-ref=mykey/ /collection-descriptor And in B class descriptor write

Help with 1n mapping (new to OJB)

2003-11-28 Thread Pablo A. Osso
Hello, Can anybody help me understand 1:n associations ? OJB site isn't clear to me. Here is my case: I have a Group which has a Person collection named members. How can I resolve this without adding a foreing key to Person ? I don't want Person to know in what group is a member. Warning:

Re: Help with 1n mapping (new to OJB)

2003-11-28 Thread Jim Theodoridis
: Help with 1n mapping (new to OJB) Hello, Can anybody help me understand 1:n associations ? OJB site isn't clear to me. Here is my case: I have a Group which has a Person collection named members. How can I resolve this without adding a foreing key to Person ? I don't want Person to know

RE: Help with 1n mapping (new to OJB)

2003-11-28 Thread Gelhar, Wallace Joseph
=anonymous / ... Hope this helps. Wally -Original Message- From: Pablo A. Osso [mailto:[EMAIL PROTECTED] Sent: Friday, November 28, 2003 9:32 AM To: OJB Users List Subject: Help with 1n mapping (new to OJB) Hello, Can anybody help me understand 1:n associations ? OJB site isn't clear

Re: Help with 1n mapping (new to OJB)

2003-11-28 Thread Pablo A. Osso
Thank you, That's what I was looking for ! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Help with 1n mapping (new to OJB)

2003-11-28 Thread Thomas Dudziak
/ /collection-descriptor The basic idea is that the 1:n relation between Group and Person can also be seen as a m:n relation with the (implicit) constraint that a Person is only associated with one Group. For details see the Advanced O/R mapping tutorial at: http://db.apache.org/ojb/tutorial3.html#Support

<    1   2   3   4   5   6   >