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
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
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
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
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
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
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
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
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
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
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
, 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
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
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
;
}
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
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
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
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
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]
-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
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
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
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
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
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:
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
, 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
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
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
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
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
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
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?
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
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
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
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
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
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
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
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
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
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
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
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
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?
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
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
.
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
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
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
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
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
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
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
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
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
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
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
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
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
-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
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
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
: 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
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
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
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
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
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
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
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
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
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
-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
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
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
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
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
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
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
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
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:
]
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
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
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
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
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
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
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
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
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
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
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
]
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
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:
: 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
=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
Thank you,
That's what I was looking for !
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
/
/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
201 - 300 of 531 matches
Mail list logo