extents, mapping classes to joined tables and collection-type field

2009-01-29 Thread Maxim Kuleshov
Hi! How could I configure OJB to process such scheme: I have base class A and at least one its subclass B. Each class uses different DB tables, joined to each other. In following examples I have TABLE_B references to TABLE_A by foreign key PARENT_ID. There is also third class, lets say

Re: extents, mapping classes to joined tables and collection-type field

2009-01-29 Thread Maxim Kuleshov
On Thu, 29 Jan 2009 15:18:14 +0300 Maxim Kuleshov kules...@org.vrn.ru wrote: That's scheme gives me error during XDoclet stage: The collection entries in class ojbs.ObjsList specifies a foreignkey listId that is not a persistent field in the element class (or its subclass) objs.B Well,

Re: Mapping a ListInteger (or SetInteger) with OJB.

2008-02-20 Thread Armin Waibel
Hi Johan, Johan Andersson wrote: Greetings! Say I have a class MyClass it looks like this: public class MyClass { private int id; private String name; private ListInteger myIntegers = new ArrayListInteger; /* getters and setters omitted ... */ } What options do I have if I

Mapping a ListInteger (or SetInteger) with OJB.

2008-02-18 Thread Johan Andersson
Greetings! Say I have a class MyClass it looks like this: public class MyClass { private int id; private String name; private ListInteger myIntegers = new ArrayListInteger; /* getters and setters omitted ... */ } What options do I have if I want to persist this class using

Re: Mapping hierarchy in one table problem

2008-02-11 Thread Alessandro Colantoni
the answer. It's shame on me. OJB has nothing do do with that. I forgot to include a reference to the GrandChildProject mapping file (grandChildProject;) in the repository.xml file. So, OJB could not find where the mapping file is and returned a version of its mapped parent. Three days lost trying

Re: Mapping hierarchy in one table problem

2008-02-11 Thread Schmidt
Hi Alessandro, Yes, you are right, it's a typho. But it does not reflect my real code. Nevertheless, I have found the answer. It's shame on me. OJB has nothing do do with that. I forgot to include a reference to the GrandChildProject mapping file (grandChildProject;) in the repository.xml file

Re: Mapping hierarchy in one table problem

2008-02-11 Thread Alessandro Colantoni
Just having a first superficial look. I see in your code GenericDAOApacheOJBGrandChildObject, Long grandChildProjectDao I didn't see GrandChildObject anywere else in your mapping, but maybe I'm not seeing well. Shouldn't it be GenericDAOApacheOJBGrandChildProject, Long ? On 2/11/08

Re: Mapping hierarchy in one table problem

2008-02-11 Thread Schmidt
identified by the id 1245 is a GrandChildProject (className=br.com.xxx.model.GrandChildProject). The persistentClass attribute points to the correct class (GrandChildProject) but somehow OJB returns a ChildProject reference. I'm really stuck. One more doubt regarding mapping class hierarchy in one

Re: Mapping hierarchy in one table problem

2008-02-08 Thread Schmidt
a ChildProject? -- View this message in context: http://www.nabble.com/Mapping-hierarchy-in-one-table-problem-tp15354434p15354534.html Sent from the Apache DB - ObjectRelationalBridge Users mailing list archive at Nabble.com

Mapping hierarchy in one table problem

2008-02-08 Thread Schmidt
or strategy used in this example? Thanks in advance! -- View this message in context: http://www.nabble.com/Mapping-hierarchy-in-one-table-problem-tp15354434p15354434.html Sent from the Apache DB - ObjectRelationalBridge Users mailing list archive at Nabble.com

Re: Mapping hierarchy in one table problem

2008-02-08 Thread Schmidt
used in this example? The mapping seems ok. regards, Armin Thanks in advance! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context

Re: Mapping hierarchy in one table problem

2008-02-08 Thread Armin Waibel
objects, OJB returns a ChildProject reference. This ends up in a ClassCastException. Is there anything wrong in the mappings or strategy used in this example? The mapping seems ok. regards, Armin Thanks in advance

Re: Mapping hierarchy in one table problem

2008-02-08 Thread Schmidt
Any clue? I've spent the last 4 hours trying to figure out what can be wrong, but the problem persists. I'm running out of ideas :( -- View this message in context: http://www.nabble.com/Mapping-hierarchy-in-one-table-problem-tp15354434p15359642.html Sent from the Apache DB

Re: Mapping hierarchy in one table problem

2008-02-08 Thread Schmidt
Upgraded to 1.0.4 and the problem persists. Any idea? -- View this message in context: http://www.nabble.com/Mapping-hierarchy-in-one-table-problem-tp15354434p15361892.html Sent from the Apache DB - ObjectRelationalBridge Users mailing list archive at Nabble.com

Re: Mapping hierarchy in one table problem

2008-02-08 Thread Armin Waibel
Schmidt wrote: Upgraded to 1.0.4 and the problem persists. Any idea? In OJB test-suite we run several tests using table per hierarchy inheritance without any problems. So please, post all information to reproduce your issue - java source code or pseudo code of the java objects and the query.

Mapping for type BIT broke afer upgrade from 1.0.1 to 1.0.4

2008-01-29 Thread Oliver Seimel
Hi, we migrated from ojb 1.0.1 to 1.0.4 DB is Postgres. But I think, that the problem is independent of the DB. We use the type BIT(1) for boolean values, so a mapping looks like this: field-descriptor name=emailNotice column=emailnotice jdbc-type=BIT / With version 1.0.1

AW: Mapping for type BIT broke afer upgrade from 1.0.1 to 1.0.4

2008-01-29 Thread Oliver Seimel
Hi Armin, Oliver Seimel wrote: Hi, we migrated from ojb 1.0.1 to 1.0.4 DB is Postgres. But I think, that the problem is independent of the DB. We use the type BIT(1) for boolean values, so a mapping looks like this: field-descriptor name=emailNotice column

Re: Mapping for type BIT broke afer upgrade from 1.0.1 to 1.0.4

2008-01-29 Thread Armin Waibel
Hi Oliver, Oliver Seimel wrote: Hi, we migrated from ojb 1.0.1 to 1.0.4 DB is Postgres. But I think, that the problem is independent of the DB. We use the type BIT(1) for boolean values, so a mapping looks like this: field-descriptor name=emailNotice column=emailnotice jdbc-type

Re: n:m mapping problem

2007-09-14 Thread Armin Waibel
of Apache OJB Thanks for your help, Regards, Truong Nguyen On 9/7/07, Armin Waibel [EMAIL PROTECTED] wrote: Hi, your mapping seems ok. Sounds like a bug in OJB. I tried to reproduce your problem without success (using

Re: n:m mapping problem

2007-09-06 Thread Armin Waibel
Hi, your mapping seems ok. Sounds like a bug in OJB. I tried to reproduce your problem without success (using latest version of OJB from SVN OJB_1_0_RELEASE branch) - never get a NPE. I use the mapping from the m:n example (with Person and Project) and do: oid = broker.serviceIdentity

Re: n:m mapping problem

2007-09-06 Thread Truong Nguyen Huy
from a mirror location of Apache OJB Thanks for your help, Regards, Truong Nguyen On 9/7/07, Armin Waibel [EMAIL PROTECTED] wrote: Hi, your mapping seems ok. Sounds like a bug in OJB. I tried to reproduce your

Re: Inheritance Mapping

2007-03-07 Thread Armin Waibel
Adam Brons wrote: Thanks for the response Armin. What you mentioned may be right, but either case isn't what I'm wanting. The scenario that I'm trying to solve is this: 1 database table Employee and Manager The MANAGER_EMPLOYEE_MAP is a mapping table for an additional

Re: Inheritance Mapping

2007-03-06 Thread Armin Waibel
Hi Adam, Adam Brons wrote: Hey Everyone, I have a question about mapping inheritance. What I'm having trouble doing is reading and updating a collection of a subclasses. It writes the Manager entry with the Manager = Employee mapping without problem. Unfortunately when I read

Inheritance Mapping

2007-03-05 Thread Adam Brons
Hey Everyone, I have a question about mapping inheritance. What I'm having trouble doing is reading and updating a collection of a subclasses. It writes the Manager entry with the Manager = Employee mapping without problem. Unfortunately when I read in the Company class and it loads

Re: JAVA_OBJECT and type mapping via OJB

2006-06-17 Thread Armin Waibel
Armin Waibel wrote: Hi Maxim, Maxim Kuleshov wrote: Hello! I've tried to use type-mapping feature of JDBC in apache OJB but failed. Broker reports the following error: ... Caused by: org.apache.ojb.broker.OJBRuntimeException: The type JAVA_OBJECT can not be handled by OJB. Please specify only

Re: JAVA_OBJECT and type mapping via OJB

2006-06-15 Thread Armin Waibel
Hi Maxim, Maxim Kuleshov wrote: Hello! I've tried to use type-mapping feature of JDBC in apache OJB but failed. Broker reports the following error: ... Caused by: org.apache.ojb.broker.OJBRuntimeException: The type JAVA_OBJECT can not be handled by OJB. Please specify only types as defined

JAVA_OBJECT and type mapping via OJB

2006-06-14 Thread Maxim Kuleshov
Hello! I've tried to use type-mapping feature of JDBC in apache OJB but failed. Broker reports the following error: ... Caused by: org.apache.ojb.broker.OJBRuntimeException: The type JAVA_OBJECT can not be handled by OJB. Please specify only types as defined by java.sql.Types. ... Are any

Re: Using two mapping file in the same project ?

2006-05-31 Thread ABOU LINA
instances no concurrency issues are expected. regards, Armin On 5/24/06, Armin Waibel [EMAIL PROTECTED] wrote: Hi, ABOU LINA wrote: Hi; i have two mapping file : repository1.xml and repository2.xml

Re: Using two mapping file in the same project ?

2006-05-31 Thread ABOU LINA
On 5/24/06, Armin Waibel [EMAIL PROTECTED] wrote: Hi, ABOU LINA wrote: Hi; i have two mapping file : repository1.xml and repository2.xml. the difference between these two file are the value of auto-* [auto

Re: Using two mapping file in the same project ?

2006-05-31 Thread Armin Waibel
a InputStream to read a mapping file. The class: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/broker/metadata/MetadataTest.java?view=markup The file to read: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/test/org/apache/ojb/Test_ClassDescriptor.xml

Re: Using two mapping file in the same project ?

2006-05-25 Thread ABOU LINA
) use different broker instances no concurrency issues are expected. regards, Armin On 5/24/06, Armin Waibel [EMAIL PROTECTED] wrote: Hi, ABOU LINA wrote: Hi; i have two mapping file : repository1.xml and repository2

Re: Using two mapping file in the same project ?

2006-05-25 Thread Armin Waibel
two mapping file : repository1.xml and repository2.xml. the difference between these two file are the value of auto-* [auto-retrieve, auto-update ..] ; at runtime sometimes i need to use repository1.xml and somtimes the repository2.xml . what is the best and optimal

Using two mapping file in the same project ?

2006-05-24 Thread ABOU LINA
Hi; i have two mapping file : repository1.xml and repository2.xml. the difference between these two file are the value of auto-* [auto-retrieve, auto-update ..] ; at runtime sometimes i need to use repository1.xml and somtimes the repository2.xml . what is the best and optimal solution about

Re: Using two mapping file in the same project ?

2006-05-24 Thread Armin Waibel
Hi, ABOU LINA wrote: Hi; i have two mapping file : repository1.xml and repository2.xml. the difference between these two file are the value of auto-* [auto-retrieve, auto-update ..] ; at runtime sometimes i need to use repository1.xml and somtimes the repository2.xml . what is the best

Re: Using two mapping file in the same project ?

2006-05-24 Thread ABOU LINA
= PersistenceBrokerFactory.defaultPersistenceBroker(); so in this situation B got a broker with profile admin because MetaManager is a singleton. is right On 5/24/06, Armin Waibel [EMAIL PROTECTED] wrote: Hi, ABOU LINA wrote: Hi; i have two mapping file : repository1.xml and repository2

Re: Using two mapping file in the same project ?

2006-05-24 Thread ABOU LINA
, Armin Waibel [EMAIL PROTECTED] wrote: Hi, ABOU LINA wrote: Hi; i have two mapping file : repository1.xml and repository2.xml. the difference between these two file are the value of auto-* [auto-retrieve, auto-update ..] ; at runtime sometimes i need to use repository1.xml and somtimes

Re: Using two mapping file in the same project ?

2006-05-24 Thread Armin Waibel
and never detect problems with this feature. Again if user A and B (different threads) use different broker instances no concurrency issues are expected. regards, Armin On 5/24/06, Armin Waibel [EMAIL PROTECTED] wrote: Hi, ABOU LINA wrote: Hi; i have two mapping file

Re: Using two mapping file in the same project ?

2006-05-24 Thread ABOU LINA
if user A and B (different threads) use different broker instances no concurrency issues are expected. regards, Armin On 5/24/06, Armin Waibel [EMAIL PROTECTED] wrote: Hi, ABOU LINA wrote: Hi; i have two mapping file : repository1.xml and repository2.xml

Re: Using two mapping file in the same project ?

2006-05-24 Thread Armin Waibel
: Hi, ABOU LINA wrote: Hi; i have two mapping file : repository1.xml and repository2.xml. the difference between these two file are the value of auto-* [auto-retrieve, auto-update ..] ; at runtime sometimes i need to use repository1.xml and somtimes the repository2.xml

Re: Using two mapping file in the same project ?

2006-05-24 Thread ABOU LINA
are expected. regards, Armin On 5/24/06, Armin Waibel [EMAIL PROTECTED] wrote: Hi, ABOU LINA wrote: Hi; i have two mapping file : repository1.xml and repository2.xml. the difference between these two file are the value of auto-* [auto

Re: Mapping List's

2006-04-05 Thread Armin Waibel
in JIRA. regards, Armin regards Markus On Mon, 2006-03-27 at 11:51 +0200, Armin Waibel wrote: Hi Markus, Markus Brigl wrote: Hi, I have a problem with the mapping of List's. If I store the list to DB and reload it the order of the objects are casual and not the same as I inserted them

Re: Mapping List's

2006-03-27 Thread Armin Waibel
Hi Markus, Markus Brigl wrote: Hi, I have a problem with the mapping of List's. If I store the list to DB and reload it the order of the objects are casual and not the same as I inserted them in the List. Can I configure the repository file in some way that OBJ stores even the indexes

Re: Mapping List's

2006-03-27 Thread Markus Brigl
a problem with the mapping of List's. If I store the list to DB and reload it the order of the objects are casual and not the same as I inserted them in the List. Can I configure the repository file in some way that OBJ stores even the indexes of the List? Do you mean mapping of 1:n

Re: URGENT please, : MAPPING BIDIRECTIONAL NAVIGATION 1:1 ??? ojb 1.0.3

2006-02-14 Thread ABOU LINA
. On 2/14/06, Armin Waibel [EMAIL PROTECTED] wrote: Hi, ABOU LINA wrote: Hi, i give you this sample example : in case AB [1:n] : the mapping of this bidiractional navigation is guaranted by the use of inverse-foreignkey : Mapping A classe

Re: URGENT please, : MAPPING BIDIRECTIONAL NAVIGATION 1:1 ??? ojb 1.0.3

2006-02-14 Thread Armin Waibel
: http://db.apache.org/ojb/docu/guides/query.html#Report+Queries Much more complex will be the use of different metadata profiles (different persistent object metadata mapping for the same objects), e.g. a normal profile and specific read profiles (without specific fields). http://db.apache.org

URGENT please, : MAPPING BIDIRECTIONAL NAVIGATION 1:1 ??? ojb 1.0.3

2006-02-13 Thread ABOU LINA
Hi, i give you this sample example : in case AB [1:n] : the mapping of this bidiractional navigation is guaranted by the use of inverse-foreignkey : Mapping A classe : collection-descriptor name=allB

Re: URGENT please, : MAPPING BIDIRECTIONAL NAVIGATION 1:1 ??? ojb 1.0.3

2006-02-13 Thread Armin Waibel
Hi, ABOU LINA wrote: Hi, i give you this sample example : in case AB [1:n] : the mapping of this bidiractional navigation is guaranted by the use of inverse-foreignkey : Mapping A classe : collection-descriptor

MAPPING BIDIRECTIONAL NAVIGATION 1:1 ??? ojb 1.0.3

2006-02-10 Thread ABOU LINA
Hi, i give you this sample example : in case AB [1:n] : the mapping of this bidiractional navigation is guaranted by the use of inverse-foreignkey : Mapping A classe : collection-descriptor name=allB

Mapping Multiple Joined Tables

2005-11-15 Thread Ryan Harris
I'm getting unexpected results from my application and can't figure out what I have configured improperly. I have mapped classes on muliple joined tables in the simple example below which is very much similar to the example in the documentation advanced-technique. I have an A class and a B

1:n mapping update problem

2005-10-20 Thread Eric Kelm
I am having a problem with using a 1:N mapping in OJB. I have a main object, ServiceTicket, which has multiple Note objects in a collection. When I retrieve the ServiceTicket object, all the correct Note objects are in the Vector notes, which is an attribute of the ServiceTicket. The problem comes

Getting the datasource of the mapping...

2005-08-11 Thread Luc Fouin
hi all, i've got a mapping with a set of objects. i've also got in the same database datas which are not mapped to an object (because they are just here for analysis and d'ont need to be instanciated...) my goal is to query the database using a SQL Query. I can't use OQL (QueryByCriteria

RE: Getting the datasource of the mapping...

2005-08-11 Thread Charles Anthony
the underlying connection to the pool HTH, Charles. -Original Message- From: Luc Fouin [mailto:[EMAIL PROTECTED] Sent: 11 August 2005 11:40 To: ojb-user@db.apache.org Subject: Getting the datasource of the mapping... hi all, i've got a mapping with a set of objects. i've also got in the same

Re: Getting the datasource of the mapping...

2005-08-11 Thread Armin Waibel
Hi, please have a look at http://db.apache.org/ojb/docu/guides/connection.html#Can+I+directly+obtain+a%0A regards, Armin Luc Fouin wrote: hi all, i've got a mapping with a set of objects. i've also got in the same database datas which are not mapped to an object (because

Re: Getting the datasource of the mapping...

2005-08-11 Thread Luc Fouin
Armin Waibel a écrit : Hi, please have a look at http://db.apache.org/ojb/docu/guides/connection.html#Can+I+directly+obtain+a%0A regards, Armin Thanks Charles Armin, it was exactly what i was looking for... ;) Luc -- Luc FOUIN - Stagiaire Aptiwan Mél :

Linguine Maps visualization for OJB mapping files

2005-08-11 Thread Pavel Simakov
Linguine Maps is an open-source (LGPL, Java 1.4+) utility that will automatically produce easy to read UML-style entity-relation diagrams from OJB mapping files. The diagram shows all the entities with their attributes from the original OJB mapping files and the relationships between entities

mapping classes on multiple joined tables

2005-05-26 Thread Ryan Vanderwerf
Hi, I'm having a problem with mapping classes on multiple joined tables on OJB 1.0.3. I am following the 'Advanced O/R' tutorial in the section 'Mapping Classes on Multiple Joined Tables'. I have 2 tables, one table is a child of the other: parent -- class-descriptor class

Re: bidirectional 1:1 mapping not working with OJB?

2005-05-18 Thread Martin Kaln
Torsten Liermann wrote: I need a bi-directional mapping between 'Project' - 'ProjectTeam'. OJB set the relation form 'Project' to 'ProjectTeam' nice, but the link from 'ProjectTeam' to 'Project' was not updated. What is wrong? Thanks for help. Tell us a bit more about your use-case

Re: bidirectional 1:1 mapping not working with OJB?

2005-05-12 Thread Armin Waibel
Hi Torsten, you don't post details about how you are insert?/update? Project/ProjectTeam objects (source code example) and you don't specifiy the used api. Please post some test code. regards Armin Torsten Liermann wrote: Hi, (sorry, no english) I need a bi-directional mapping between 'Project

bidirectional 1:1 mapping not working with OJB?

2005-05-05 Thread Torsten Liermann
Hi, (sorry, no english) I need a bi-directional mapping between 'Project' - 'ProjectTeam'. OJB set the relation form 'Project' to 'ProjectTeam' nice, but the link from 'ProjectTeam' to 'Project' was not updated. What is wrong? Thanks for help. class-descriptor class=ProcektTeamVO table

Mapping 2 or more all classes on the same table

2005-04-28 Thread Ramakrishna Reddy
Hi, Do we have proper calssDecriminator (Mapping the all classes on the same table.) mechanism without side effects in OJB, on the same lies of Hibernate? In the documentation is it just mentioned, but not sufficient details and examples are gives on that Regards, Ramki

Re: Mapping 2 or more all classes on the same table

2005-04-28 Thread Thomas Mahler
Dear Ramakrishna, We had this feature since 2001! Please note that OJB is not based on lies ! for details refer to the documentation under http://db.apache.org/ojb/docu/guides/advanced-technique.html#Mapping+All+Classes+on+the+Same+Table cheers, Thomas Ramakrishna Reddy wrote: Hi, Do we have

Re: Mapping Classes on Multiple Joined Tables

2005-04-21 Thread Jakob Braeuchi
hi armin, Armin Waibel schrieb: Stefan Walkner wrote: hello, we start working on this issue. Hope till next release this will be fixed. thank you for the info! I really was searching long and was not able to find any information about that, so I'm glad to hear any response from you. The issue

Re: Mapping Classes on Multiple Joined Tables

2005-04-21 Thread Armin Waibel
Jakob Braeuchi wrote: The issue is noted in the release-notes: snip - When a class mapped on multiple joined tables was used in a reference only objects of the base type class will be instantiated, e.g. a Company class has a 1:n reference 'employees' to a base class Employee and class

RE: Mapping Classes on Multiple Joined Tables

2005-04-21 Thread Gelhar, Wallace Joseph
So is it now possible to combine the extent concept with a mapping on multiple joined tables? What would be the expected behavior in such a scenario? class-descriptor class=BaseClassThatCouldBeConcrete table=BaseClassTable extent-class class-ref=SubClass / ... /class-descriptor class

Mapping Classes on Multiple Joined Tables

2005-04-20 Thread Stefan Walkner
hello, I use Mapping Classes on Multiple Joined Tables to map an Object which inherits from another into two tables. BUT: is there a way to get the different objects back, when querying? I mean, I have following mappings: -- class-descriptor class

Re: Mapping Classes on Multiple Joined Tables

2005-04-20 Thread Armin Waibel
Hi Stefan, Stefan Walkner wrote: hello, I use Mapping Classes on Multiple Joined Tables to map an Object which inherits from another into two tables. BUT: is there a way to get the different objects back, when querying? I mean, I have following mappings: we start working on this issue. Hope till

Re: Mapping Classes on Multiple Joined Tables

2005-04-20 Thread Stefan Walkner
hello, we start working on this issue. Hope till next release this will be fixed. thank you for the info! I really was searching long and was not able to find any information about that, so I'm glad to hear any response from you. Thank you, stefan walkner

Re: Mapping Classes on Multiple Joined Tables

2005-04-20 Thread Armin Waibel
Stefan Walkner wrote: hello, we start working on this issue. Hope till next release this will be fixed. thank you for the info! I really was searching long and was not able to find any information about that, so I'm glad to hear any response from you. The issue is noted in the release-notes:

Re: mapping one object in different RDBMS - source

2005-04-11 Thread Armin Waibel
Hi, Stas Ostapenko wrote: I have a problem with inserting all table data of one table to another table in other RDBMS. Following code works, but it stores not all the data, but only first object. Where I`m wrong ? First you have to take care that metadata changes are global operations, all

Re: mapping one object in different RDBMS - source

2005-04-11 Thread Stas Ostapenko
PB.getIteratorByQuery sounds logic, I think. How I can use multiply repository profiles and still use PB.getIteratorByQuery ? I thik it will be coll when I can dynamically change only table name and operate with same object but in different db. Mapping for particular object I have alredy, one thing I need

mapping one object in different RDBMS

2005-04-07 Thread Stas Ostapenko
I`m trying to do mapping one object in two RDBMS and different tables. How can I create mapping and access SAME objects in different db`s on the fly ?.For example to store search results of databaseA in databaseB ? I use PB API

mapping one object in different RDBMS - source

2005-04-07 Thread Stas Ostapenko
I have a problem with inserting all table data of one table to another table in other RDBMS. Following code works, but it stores not all the data, but only first object. Where I`m wrong ? Please help. import org.apache.ojb.broker.PersistenceBroker; import

Re: OJB - Inheritance - ClassTable Mapping

2005-03-26 Thread Stefan Walkner
hello again, I could solve this problem by just rtfm: http://db.apache.org/ojb/docu/guides/advanced-technique.html#Mapping+Classes+on+Multiple+Joined+Tables But one problem I still can't figure out: when using broker.store(MyObject) with mapping to multiple tables I use a foreign key from

OJB - Inheritance - ClassTable Mapping

2005-03-25 Thread Stefan Walkner
Hello, I would like to map an extended class to a table and a parent table. This means: I have following classes: Item SpecialItem extends Book and following tables: items items_specialitem IMHO the advantage of this structure is that the items_specialitem extends the items table

Mapping objects across multiple repositories

2005-03-14 Thread Nuno Ochoa
Hi, Is there any documentation regarding mapping objects across multiple repositories? Is it possible to map specific tables to a given respository, or is the connection used for the entire mapping. Thanks, Nuno Ochoa

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
each reference has to use a composite FK key too. in User (assume the 'login' datatype is INTEGER and User use an autoincrement PK, only show mapping for the 'home' reference, 'work' will be the same): You need a FK field for each PK value of the referenced object, if you use 'anonymous' fields

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
and WorkAddress from Address - setup the constructor of both classes as described in http://db.apache.org/ojb/docu/guides/advanced-technique.html#Extents+and+Pol ymorphism - setup the repository.xml as described in the chapter http://db.apache.org/ojb/docu/guides/advanced-technique.html#Mapping+All+Cla

Re: Mapping question

2005-03-03 Thread Georg Müller
to take care that every setHomeAddress also modifies the collection (because I don't think that getAddresses() is invoked by ojb either ;) ) May be I implement a query costomizer who filters the addresses like described in the advanced mapping tutorial: collection-descriptor name

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: Decomposed m:n mapping with ojb and jdo

2005-01-29 Thread Christoph Hermann
Christoph Hermann schrieb: Hello again, The problem seems to lie here: !-- ProfileMenuCategory -- class-descriptor class=papillon.ProfileMenuCategory table=rel_profiles_menu_categories field-descriptor name=profile_id column=profiles_id jdbc-type=INTEGER primarykey=true /

Re: Decomposed m:n mapping with ojb and jdo

2005-01-29 Thread Thomas Dudziak
Both your references use a primarykey part as their foreignkey. Is this really what you want ? The referenced objects must then have the same primarykey value (part) as the ProfileMenuCategory object, and that before you store the ProfileMenutCategory object, otherwise you would overwrite your

Re: Decomposed m:n mapping with ojb and jdo

2005-01-29 Thread Christoph Hermann
Thomas Dudziak schrieb: Hello, Both your references use a primarykey part as their foreignkey. Is this really what you want ? The referenced objects must then have the same primarykey value (part) as the ProfileMenuCategory object, and that before you store the ProfileMenutCategory object,

Re: Decomposed m:n mapping with ojb and jdo

2005-01-29 Thread Christoph Hermann
Thomas Dudziak schrieb: Hello, You should not use the primarykey for this. It would be better if you add a simple primarykey field to the ProfileMenuCategory, make the other two fields normal fields, and in the database add a unqiue constraint on these two fields. This way, the database will

Decomposed m:n mapping with ojb and jdo

2005-01-28 Thread Christoph Hermann
Hello, i try to realize an m:n mapping using ojb/jdo and update the java classes with cocoon using cforms. My problem ist, that i don't get the intermediate table to update correctly in the database. I have the following three classes: public class Profile implements Serializable

OJB rc.1.0.1 Unidirectional 1:n Mapping problem .

2005-01-20 Thread SteveWarder
Hi , I am working on a web application using Tomcat4 , Mysql and OJB. I've recently upgraded from OJB 1.0.rc3 to OJB v1.0.1 and my previously working unidirectional 1:n mapping no longer works with the auto-retreive settings. I've been through all the new documentation and seem to have

Re: OJB rc.1.0.1 Unidirectional 1:n Mapping problem .

2005-01-20 Thread Armin Waibel
. regards, Armin SteveWarder wrote: Hi , I am working on a web application using Tomcat4 , Mysql and OJB. I've recently upgraded from OJB 1.0.rc3 to OJB v1.0.1 and my previously working unidirectional 1:n mapping no longer works with the auto-retreive settings. I've been through all the new

Re: mapping class to multiple tables?

2005-01-08 Thread robertl
be nice if OJB knew what datasource it had to go to to build the class. --Bobby From: Armin Waibel [EMAIL PROTECTED] Subject: mapping class to multiple tables? Date: Mon, 17 Feb 2003 11:18:32 +0100 Content-Type: text/plain; charset=iso-8859-1 Hi Jesse, - Original Message - From: Jesse

Re: Is Mapping Classes on Multiple Joined Tables supported?

2005-01-04 Thread Thomas Dudziak
I'm sorry, I forgot to add Collection of A's in C (see above). With this collection, xdoclet fails - for both 1.0.1 release and 1.0.x branch (I'm working off the branch as mentioned above). Ok, right, in this case I too get the error that you described. Yes, it is not: first, you have to

RE: Is Mapping Classes on Multiple Joined Tables supported?

2004-12-30 Thread Nils Liebelt
Hi Vadim, Stick to the Repository file I posted earlier! If you don't use the abstract modifier for the super class it works. Regards, Nils - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: Is Mapping Classes on Multiple Joined Tables supported?

2004-12-30 Thread Thomas Dudziak
Vadim Gritsenko wrote: Hey All, [Using OJB_1_0_RELEASE branch from CVS] As other users here, I'm also struggling with mapping class hierarchy on multiple joined tables, and can't figure out what's wrong and whether it is working at all or not. Consider this slightly modified (added relation

Re: Is Mapping Classes on Multiple Joined Tables supported?

2004-12-30 Thread Vadim Gritsenko
Thomas Dudziak wrote: Vadim Gritsenko wrote: Hey All, [Using OJB_1_0_RELEASE branch from CVS] As other users here, I'm also struggling with mapping class hierarchy on multiple joined tables, and can't figure out what's wrong and whether it is working at all or not. Consider this slightly

Re: Is Mapping Classes on Multiple Joined Tables supported?

2004-12-30 Thread Vadim Gritsenko
Nils Liebelt wrote: Hi Vadim, Stick to the Repository file I posted earlier! If you don't use the abstract modifier for the super class it works. I don't have abstract classes anywhere - my case is a bit different. It's about mapping classes A and B, where B extends A, to two tables, and class C

OJB 1.0.1 mapping associations(1:1,1:n) not working with Oracle8

2004-11-14 Thread f.rub
Hi all, I tried to port an application from mysql to oracle 8. My problem is the same as described here: http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]msgId=1643290 Assigned to the mapping associations i.e. I get a null value because the n-side objects (or single object for 1:1

Re: Simple Inheritance problem with multiple class to one table mapping

2004-11-14 Thread Thomas Dudziak
Sylvain Juge wrote: the XDoclet output is the following In fact now it doesn't process the Apartement.java file, and I don't know why because It used to process the file before. However, even if the file was processed by xdoclet, there was no result in the repository file, like now when it's

Re: Re: Simple Inheritance problem with multiple class to one table mapping

2004-11-14 Thread Sylvain Juge
Hi, Thank for your help, but I think I solved my problem. I don't know what I was doing wrong, but simply by rewriting by hand the Apartment Class, I solved the problem. Now I works really great, despite sometimes Eclipse seems to go a little crazy, so I think I also need to update it (ver

  1   2   3   4   5   6   >