Mapping question

2005-03-03 Thread Georg Müller
Hi, I have an object User who has 2 addresses, home and work. User is mapped to a table user (no problem here). Both home and work address are mapped to a table address. This table has a composite primary key: login and type - login from table user as a foreign key - type is a string (or enum)

Re: Mapping question

2005-03-03 Thread Georg Müller
Sorry for that second posting. I sent this before I subscribed to the list, so I thought it will not be posted (now, with a latency of nearly one day) Regards, Georg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

RE: Mapping question

2005-03-03 Thread Günther Wieser
also interested in a solution for that! kr, guenther -Original Message- From: Georg Müller [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 02, 2005 9:24 PM To: ojb-user@db.apache.org Subject: Mapping question Hi, I have an object User who has 2 addresses, home and work. User is mapped

Re: Mapping question

2005-03-03 Thread Armin Waibel
:[EMAIL PROTECTED] Sent: Wednesday, March 02, 2005 9:24 PM To: ojb-user@db.apache.org Subject: Mapping question Hi, I have an object User who has 2 addresses, home and work. User is mapped to a table user (no problem here). Both home and work address are mapped to a table address. This table has

Re: Mapping question

2005-03-03 Thread Thomas Dudziak
As far as I understand he wants to use a reference that refers to a class with a compound primarykey, where one of the foreignkey values is fixed: reference-descriptor name=homeAddress class-ref=Address auto-update=true

Re: Mapping question

2005-03-03 Thread Georg Müller
Thomas Dudziak wrote: As far as I understand he wants to use a reference that refers to a class with a compound primarykey, where one of the foreignkey values is fixed: reference-descriptor name=homeAddress class-ref=Address auto-update=true

RE: Mapping question

2005-03-03 Thread Günther Wieser
when showing how to implement your own ClassDescriptor. cool stuff! kr, guenther -Original Message- From: Georg Müller [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 11:33 PM To: OJB Users List Subject: Re: Mapping question Thomas Dudziak wrote: As far as I understand he

Re: Mapping question

2005-03-03 Thread Georg Müller
I now have a running version, but the way Thomas proposed would be much nicer. I have added a collection descriptor collection-descriptor name=addresses element-class-ref=Adress auto-update=true auto-delete=true inverse-foreignkey field-ref=login/ /collection-descriptor and he returns

Mapping question

2005-03-02 Thread Georg Mller
Hi, I have an object User who has 2 addresses, one for home and one for work. User is mapped to a table user (no problem here). Both home and work address are mapped to a table address. This table has a composite primary key: login and type - login from table user as a foreign key - type is a

RE: Mapping question

2004-06-03 Thread Daniel Perry
: Re: Mapping question Hi Daniel, I had a look at the extents now. I think this will basically work. The problem I see is, that the database has 110 tables and all are using a globally generated OID. In my basic class I would have to list all other classes as extents of this one. What does

Re: Mapping question

2004-06-02 Thread Sebastian
To simplify my question: I have a table containing a foreign key column and the foreign key of a row points to different tables based on the first three letters of the foreign key. E.g. when it starts with art then it points to a record in the article table. When it starts with cat then it

RE: Mapping question

2004-06-02 Thread Daniel Perry
] Subject: Re: Mapping question To simplify my question: I have a table containing a foreign key column and the foreign key of a row points to different tables based on the first three letters of the foreign key. E.g. when it starts with art then it points to a record in the article table. When

Re: Mapping question

2004-06-02 Thread Sebastian
types extend it. It would pick the right class based on whichever table has an item with that primary key. Daniel. -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Sebastian Sent: 02 June 2004 17:07 To: [EMAIL PROTECTED] Subject: Re: Mapping question To simplify my question

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

RE: Simple 1:n mapping question

2004-01-30 Thread Brendan Richards
2004 06:22 To: [EMAIL PROTECTED] Subject: Simple 1:n mapping question 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

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: Mapping Question

2004-01-04 Thread Coup, Robert Muir
Downloads/Documents (i.e decomposed M:N) but you can keep the existing table stuff. Others may have better ideas :) Good Luck, Rob :) -Original Message- From: Patrick Scheuerer [mailto:[EMAIL PROTECTED] Sent: Friday, 2 January 2004 2:56 p.m. To: OJB Users List Subject: Mapping

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: 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

Mapping question

2003-11-27 Thread Norbert . Woegerbauer
Hi, I've got a 1:n mapping from table A to table B. But the foreign key field of table A is not it's primary key. I can't find how to tell OJB to use another field to join table B. Thanks for help, Norbert. - To unsubscribe,

RE: Mapping question

2003-11-27 Thread Norbert . Woegerbauer
] Envoyé : jeudi 27 novembre 2003 16:57 À : [EMAIL PROTECTED] Objet : Mapping question Hi, I've got a 1:n mapping from table A to table B. But the foreign key field of table A is not it's primary key. I can't find how to tell OJB to use another field to join table B. Thanks for help, Norbert

Re: o/r mapping question

2003-11-03 Thread sclark
Natural Resources Research Center/USGS [EMAIL PROTECTED] (970)226-9291 List-Id: OJB Users List ojb-user.db.apache.org Subject: o/r mapping question Date: Thu, 30 Oct 2003 21:14:16 -0500 Thread-Topic: o/r mapping question From: Robert J Celestino [EMAIL PROTECTED] To: OJB Users List [EMAIL PROTECTED

Re: RE: Another silly newbie mapping question

2003-11-02 Thread jeichels
Still no clue on what is wrong with this. - Original Message - From: [EMAIL PROTECTED] Date: Friday, October 31, 2003 3:19 pm Subject: Re: RE: Another silly newbie mapping question Thank you Robert, but Offers are permanent pieces of information in the database whereas OrderItems

Re: RE: Another silly newbie mapping question

2003-11-02 Thread jeichels
and I want to understand this just for the sake of understanding. JohnE - Original Message - From: [EMAIL PROTECTED] Date: Sunday, November 2, 2003 5:24 pm Subject: Re: RE: Another silly newbie mapping question Still no clue on what is wrong with this. - Original Message

Another silly newbie mapping question

2003-10-31 Thread jeichels
I have worked out much harder mapping problems then this, but for some reason I am still a bit new on this stuff and making no headway. I would appreciate a more seasoned glance. Problem: OfferVO is not being materialized after succesfully retrieving the Collection of OrderItemVO by using

Re: Another silly newbie mapping question

2003-10-31 Thread jeichels
implementation. From the archives it seemed ok to map multiple primary keys to one primary key. - Original Message - From: [EMAIL PROTECTED] Date: Friday, October 31, 2003 2:49 am Subject: Re: Another silly newbie mapping question Still no luck. I noticed that my primary key order might

RE: Another silly newbie mapping question

2003-10-31 Thread Robert J Celestino
silly newbie mapping question I give up for the night. BTW I am using Release Candidate 2. Not sure it matters, but I am using PersistentFieldClass=org.apache.ojb.broker.metadata.fieldacc ess.PersistentNestedFieldMaxPerformanceImpl so that I could use '-' Single Table

Re: RE: Another silly newbie mapping question

2003-10-31 Thread jeichels
plum out of them. JohnE - Original Message - From: Robert J Celestino [EMAIL PROTECTED] Date: Friday, October 31, 2003 10:11 am Subject: RE: Another silly newbie mapping question Hello John, I think you want auto-update=true instead of false here: reference

o/r mapping question

2003-10-30 Thread Robert J Celestino
Hello all, I am stumped by what is posibly a very simple mapping problem. Consider something like this Person is stored in the person table Person has-a AddressGroup. AddressGroup is not stored in the DB AddressGroup has a list of Addresses Address is stored in

RE: o/r mapping question

2003-10-30 Thread Lance Eason
Message- From: Robert J Celestino [mailto:[EMAIL PROTECTED] Sent: Thursday, October 30, 2003 8:14 PM To: OJB Users List Subject: o/r mapping question Hello all, I am stumped by what is posibly a very simple mapping problem. Consider something like this Person is stored in the person

Re: o/r mapping question

2003-10-30 Thread Brian McCallister
Solution 1: Implement AddressGroup as a custom collection (implementing Manageable Collection) used to hold the address instances. This muddies the domain model a bit as AddressGroup then needs to know about ManageableCollection. Solution 2: Map two classes to the same table (I used an

Re: N same class mapping question...

2003-10-29 Thread Oleg Nitz
Hi Brian, I have fixed the OTM bug (M:N relations wasn't updated). Thanks for detailed bug report. Regards, Oleg On Tuesday 14 October 2003 14:16, Brian McCallister wrote: On Tuesday, October 14, 2003, at 09:33 AM, [EMAIL PROTECTED] wrote: Hej Brian, -Original Message- From:

Re: N same class mapping question...

2003-10-14 Thread Brian McCallister
I have mixed and matched the value, but it hasn't mattered. I had thought it might care so I tried various combinations. It in this vase being a nebulous entity who thwarts my plans, as to my knowledge neither OJB nor Postgres care about case of table names. Will experiment on that one further

RE: N same class mapping question...

2003-10-14 Thread oliver . matz
Hej Brian, -Original Message- From: Brian McCallister [mailto:[EMAIL PROTECTED] I have mixed and matched the value, but it hasn't mattered. I had thought it might care so I tried various combinations. It in this vase being a nebulous entity who thwarts my plans, as to my

Re: N same class mapping question...

2003-10-14 Thread Brian McCallister
On Tuesday, October 14, 2003, at 09:33 AM, [EMAIL PROTECTED] wrote: Hej Brian, -Original Message- From: Brian McCallister [mailto:[EMAIL PROTECTED] I have mixed and matched the value, but it hasn't mattered. I had thought it might care so I tried various combinations. It in this vase

RE: N same class mapping question...

2003-10-14 Thread oliver . matz
Hello Brian, -Original Message- From: Brian McCallister [mailto:[EMAIL PROTECTED] Which concrete class is instantiated for the list field? Default - I don't specify anything so should be a Vector. I bet this is the problem. You'd probably better use one of the managed

Re: N same class mapping question...

2003-10-14 Thread Brian McCallister
On Tuesday, October 14, 2003, at 10:29 AM, [EMAIL PROTECTED] wrote: I bet this is the problem. You'd probably better use one of the managed collections. Could you please check by outputting xxx.getClass().getName() somewhere? On retrieved collections it uses:

Re: N same class mapping question...

2003-10-14 Thread Brian McCallister
Follow up.. Changing the OTM Test to use PB style QueryByCriteria also fails: public void testRequestFriendOTMTwo() throws Exception { OTMConnection conn = SimpleKit.getInstance().acquireConnection(PersistenceBrokerFactory.getDe faultKey());

M:N same class mapping question...

2003-10-12 Thread Brian McCallister
I am having problems getting a class to properly persist collections of instances of the same class (see configs later in the email). Using the M:N mapping seems to be the way to do this, but it isn't actually working. If the relations exist in the database the data loads fine, however it

Re: M:N same class mapping question...

2003-10-12 Thread Brian McCallister
Note that the package names *do* match in the actual code - Changed the one in place in the email and not the other =) -Brian On Sunday, October 12, 2003, at 10:38 PM, Brian McCallister wrote: I am having problems getting a class to properly persist collections of instances of the same class