Re: Installation of OJB

2004-02-03 Thread Armin Waibel
Hi Ralf, Ralf Bode wrote: Okay Armin, will deal now with src-dist but, why am i not able to use binary? only for "enable" p6spy ? or in generall better to use SRC? The reason is I personal only use the src-version, thus I don't know much about the possibilities of the binary-version. Several

Re: Installation of OJB

2004-02-03 Thread Ralf Bode
Okay Armin, will deal now with src-dist but, why am i not able to use binary? only for "enable" p6spy ? or in generall better to use SRC? for Struts e.g. i allways use the binary-version greetings, --- Armin Waibel <[EMAIL PROTECTED]> schrieb: > Hi, > > Ralf Bode wrote: > > > Hi Armin, > >

Re: Installation of OJB

2004-02-03 Thread Armin Waibel
Hi, Ralf Bode wrote: Hi Armin, i used the bin-version. how am i now able to enable p6spy? in OJB.properties i found no key for it! you have to use the source version. greetings, is it possible, that this is a bug? (not setting the foreign-key?) hmm, I don't think so. There was a bug when equal

Anonymous Keys Warning, was Re: Installation of OJB

2004-02-03 Thread Brian McCallister
Hmm, what I get for writing docs without stepping through code carefully enough. Armin has pointed out that using anonymous keys for PK's is going to bomb if used in a clustered environment (or anywhere that persistent objects are serialized and migrated) and he is completely correct! Anyone u

Re: Installation of OJB

2004-02-03 Thread Ralf Bode
Hi Armin, i used the bin-version. how am i now able to enable p6spy? in OJB.properties i found no key for it! greetings, is it possible, that this is a bug? (not setting the foreign-key?) --- Armin Waibel <[EMAIL PROTECTED]> schrieb: > Hi Ralf, > > hmm, your test is now similar to the tests

RE: Installation of OJB

2004-02-03 Thread Daniel Perry
an id (eg updatePerson(int personId, String newName, String newJobTitle,...)). Any thoughts? Daniel. -Original Message- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: 03 February 2004 12:34 To: OJB Users List Subject: Re: Installation of OJB Hi Ralf, it does deal with anonymous f

Re: Installation of OJB

2004-02-03 Thread Armin Waibel
Hi Ralf, hmm, your test is now similar to the tests in OJB test-suite. These tests pass without problems (against hsql, sapDB, mySQL,...). How does the generated sql look like? You can use p6spy to log all generated SQL. If you run your test within OJB-suite you only need to enable p6spy in bu

Re: Installation of OJB

2004-02-03 Thread Ralf Bode
hallo armin, it is the same behavor! field "autoid" in table "kunde" is also "null" ... mmm (1.0rc5 - downloaded yesterday morning) libs in classpath: commons-collecton commons-dbcp commons-lang commons-pool db-ojb10rc5 (and mysql...) :-) i did: Auto auto = new Auto(); auto.setFarbe("blau"); K

Re: Installation of OJB

2004-02-03 Thread Armin Waibel
Hi Ralf, Ralf Bode wrote: Hi Armin, Brain and the rest :-) hier is my code (a simple test-example) CAR: ok, from my knowledge you should do package de.ralle; import java.io.Serializable; //the CAR public class Auto implements Serializable{ private Integer id; private String farbe; pu

Re: Installation of OJB

2004-02-03 Thread Ralf Bode
Hi Armin, Brain and the rest :-) hier is my code (a simple test-example) CAR: package de.ralle; import java.io.Serializable; //the CAR public class Auto implements Serializable{ private String farbe; public Auto() { } public String getFarbe() { r

Re: Installation of OJB

2004-02-03 Thread Armin Waibel
Hi Brian, Brian McCallister wrote: On Feb 3, 2004, at 7:03 AM, Armin Waibel wrote: doh! Assume the current implementation doesn't achieve this. ?! See my previous post. Also, the code in the howto was tested! Can you show me an test were a PK field was declared anonymous. I have written some

Re: Installation of OJB

2004-02-03 Thread Ralf Bode
hi brain, an example would be nice, i know, that i can not access an anonymous-key in java :-) the reason why i find this useful is, because of having clean JavaBeans for database. not blown up with eg carId (when i am also reffering to a car) but armin told, that anonymous-keys not available in

Re: Installation of OJB

2004-02-03 Thread Armin Waibel
Hi Ralf, it does deal with anonymous fields, but only in conjunction with 1:1 references. Please post class-descriptor and source for Customer, Car. regards, Armin Ralf Bode wrote: Hi Armin. okay i didn´t know about 1.0rc5 isn´t dealing with anonymous-keys. so i do like suggested in 1:1-mappin

Re: Installation of OJB

2004-02-03 Thread Brian McCallister
On Feb 3, 2004, at 7:03 AM, Armin Waibel wrote: doh! Assume the current implementation doesn't achieve this. ?! See my previous post. Also, the code in the howto was tested! -Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] Fo

Re: Installation of OJB

2004-02-03 Thread Brian McCallister
I declare PK's anonymous quite frequently. I will post an example when I get in to work =) Basically it works just like normal, you still refer to it by the name attribute (though I tend to use THIS_STYLE for names for anon keys to make sure it is clear you cannot de-reference them in the Java.

Re: Installation of OJB

2004-02-03 Thread Ralf Bode
Hi Armin. okay i didn´t know about 1.0rc5 isn´t dealing with anonymous-keys. so i do like suggested in 1:1-mapping. but then in my Beans i have int carId Car car; i do now: setCar(Car c){ car = c; carId = c.getId(); } but i think this is redundant, isn´t ? now i am very confused on dealing wit

Re: Installation of OJB

2004-02-03 Thread Armin Waibel
Hi, Ralf Bode wrote: Hi Armin, thanks for your patience, first! but the things with declaring PK_Fields i read at: http://db.apache.org/ojb/howto-use-anonymous-keys.html i did everything like told me :-) the document is written nice and understandful, doh! Assume the current implementation doesn't

Re: Installation of OJB

2004-02-03 Thread Ralf Bode
Hi Armin, thanks for your patience, first! but the things with declaring PK_Fields i read at: http://db.apache.org/ojb/howto-use-anonymous-keys.html i did everything like told me :-) the document is written nice and understandful, but only the little thing froeign-key is null in my case... did yo

Re: Installation of OJB

2004-02-03 Thread Armin Waibel
Hi Ralf, > but in my case the own id´s > of a class where anonymous too, > is that the matter? AFAIK we don't have a test case that mix this stuff. Think it is not allowed to declare a PK field anonymous. Recommend you to setup a test case similar to the examples in test suite or docu (http://db.

Re: Installation of OJB

2004-02-03 Thread Ralf Bode
Hi Armin, again... ...sorry... i looked in samples you told me! (thanks for tipps!) but i have all so like 1:1-relationship org.apache.ojb.broker.ObjectRepository$Group org.apache.ojb.broker.ObjectRepository$Componente (access="anonymous" for reffered ids) but in my case the own id´s of a class wh

Re: Installation of OJB

2004-02-02 Thread Armin Waibel
Hi Ralf, Ralf Bode wrote: hi ... again :-( it is really frustratingly... i turned OTM->true made: customer.setCar(car) broker.store(customer); I don't know what's wrong with your test, but this will definitely work with the PB-api. You can find many examples in test suite, e.g. ...broker.Anonym

Re: Installation of OJB

2004-02-02 Thread Ralf Bode
hi ... again :-( it is really frustratingly... i turned OTM->true made: customer.setCar(car) broker.store(customer); but same... customer is in DB, car not! :-( i have read in aritcle in german-javamag on OJB there was said "all is nice" or am i to stuid? i though it would be possible to store

Re: Installation of OJB

2004-02-02 Thread Brian McCallister
Objects are not automatically stored by reachability -- the car isn't inserted because it is attached to Customer. This *can* actually be done in the OTM if Car is a truly dependent object (otm-dependent attribute), but in the PB an object must be made explicitly persistent. broker.store(ca); b

Re: Installation of OJB

2004-02-02 Thread Ralf Bode
Hi Brian, now i got an "anonym" id (very nice, so i now have "pure" javaBeans no technicals in it :-) i made cu = new Custiomer(); ca = new Car(); cu.setCar(ca); broker.store(cu); now only a customer was in DB i must add the "auto-*" in descriptor: now i have a car and a customer, but cust

Re: Installation of OJB

2004-02-02 Thread Brian McCallister
Anonymous keys: http://db.apache.org/ojb/howto-use-anonymous-keys.html -Brian On Feb 2, 2004, at 2:05 PM, Ralf Bode wrote: Thanks Brian, but do you mean with "anonymous" keys ? now i have (in classes): CUSTOMER car: Car carId: int CAR: id: int (and the XML desc for it like in mail before) am

Re: Installation of OJB

2004-02-02 Thread Ralf Bode
Thanks Brian, but do you mean with "anonymous" keys ? now i have (in classes): CUSTOMER car: Car carId: int CAR: id: int (and the XML desc for it like in mail before) am i with anon.keys able to "see" car-fk in database-table CUSTOMER? after: broker.store(customer); ? thanks again, and thanks

Re: Installation of OJB

2004-02-02 Thread Brian McCallister
On Feb 2, 2004, at 1:26 PM, Ralf Bode wrote: so please not be angry (because of lots questions) (i last worked with 0.94... sorry) Thanks advice! Ralf Of course not! Your questions are particularly helpful as they point out weaknesses in the docs =) On the FK thing, if you do not use anonymous F

Re: Installation of OJB

2004-02-02 Thread Ralf Bode
Thanks! now OJB 1.0.rc5 works fine it makes me now PKs automaticly thanks but it doesn´t deal with foreignkey customer --> car i do cu = new Customer(); cu.setName("foo"); car = new Car(); car.setColor("blue"); cu.setCar(car); ... broker.store(cu); okay in DB is a new car and a new customer.

Re: Installation of OJB

2004-02-02 Thread Brian McCallister
Your primary key should be one of the primitive wrappers, ie Integer instead of int. If you use an int then it is initialized to 0, which is saved into the database as it is a valid int =( If you want autoincrement to work you need to use the Integer (or Long) wrapper. When the pk is null, it w

Re: Installation of OJB

2004-02-02 Thread Armin Waibel
Hi Ralf, Ralf Bode wrote: why must i set the PK in my code? customer.setId(123); i described it in XML primarykey="true" autoincrement="true" there is no need to set the PK but got Errsos, when i dont set up the PK. hmm, stack trace will be helpful. I assume you use the default sequence manag

RE: Installation of OJB

2004-02-02 Thread Brendan Richards
Message- From: Ralf Bode [mailto:[EMAIL PROTECTED] Sent: 02 February 2004 16:47 To: OJB Users List Subject: Re: Installation of OJB Thanks i am still dealing now without its internals ;-) i didn´t figured it out on page!! Thanks Brenden,!!! one short question - then i am quiet! :-) why must i

Re: Installation of OJB

2004-02-02 Thread Ralf Bode
Thanks i am still dealing now without its internals ;-) i didn´t figured it out on page!! Thanks Brenden,!!! one short question - then i am quiet! :-) why must i set the PK in my code? customer.setId(123); i described it in XML primarykey="true" autoincrement="true" but got Errsos, when i don

Re: Installation of OJB

2004-02-02 Thread Brian McCallister
I think Thomas may have hit on the best general purpose option, using the Torque tools he has recently written, as the ojb-core schema is pretty readily accessible. -Brian On Feb 2, 2004, at 10:29 AM, Larry V. Streepy, Jr. wrote: I struggled with this same problem when learning and working wit

Re: Installation of OJB

2004-02-02 Thread Larry V. Streepy, Jr.
I struggled with this same problem when learning and working with OJB. My final solution was to run the build of OJB and then setup my project build to extract the generated SQL (the schema.ddl file) and copy it into my build area and use ant sql tasks to generate the tables. I know that this

Re: Installation of OJB

2004-02-02 Thread Thomas Dudziak
On Mon, 2 Feb 2004, Brian McCallister wrote: > I have considered including the torque stuff in the ojb-blank project > before, and opted against it as I thought I might be pushing too much > complexity on users then. > > Right now there isn't an *ideal* way to create the internal tables as > m

Re: Installation of OJB

2004-02-02 Thread Brian McCallister
I have considered including the torque stuff in the ojb-blank project before, and opted against it as I thought I might be pushing too much complexity on users then. Right now there isn't an *ideal* way to create the internal tables as most of the time people don't need them (though the hi/lo s

RE: Installation of OJB

2004-02-02 Thread Thomas Dudziak
On Mon, 2 Feb 2004, Daniel Perry wrote: > I've always intended to figure this out, but never got round to it. I'm > currently writing java code (semi generated by eclipse), then hand coding > the repository and ddl files. Now having to build versions of software for > multiple databases, i am g

RE: Installation of OJB

2004-02-02 Thread Daniel Perry
>>If you want to start with the Java source (and have control over it), then >>the easiest way would be to use the XDoclet module, in which case it >>bascially amounts to adding special javadoc tags to your source code, and >>then invoking an ant task in your build file that creates the repositor

RE: Installation of OJB

2004-02-02 Thread Thomas Dudziak
On Mon, 2 Feb 2004, [iso-8859-1] Ralf Bode wrote: > Hi thank you, > > but i really do only search a "small" solution, > whichs only builds my internal ojb-talbes. > > if was, i would load a deliverd > obj-core.sql into my database. > > this would be enough, i am on a "lerning-trip" > so tools l

RE: Installation of OJB

2004-02-02 Thread Ralf Bode
ge... > > > -Original Message- > From: Ralf Bode [mailto:[EMAIL PROTECTED] > Sent: 02 February 2004 10:43 > To: OJB Users List > Subject: RE: Installation of OJB > > Thanks Brendan, > > but it doesn´t work! > but this would be the way i likded ;-) >

RE: Installation of OJB

2004-02-02 Thread Ralf Bode
Hi thank you, but i really do only search a "small" solution, whichs only builds my internal ojb-talbes. if was, i would load a deliverd obj-core.sql into my database. this would be enough, i am on a "lerning-trip" so tools like xdoclet seams to be "overdosed" greetings --- Thomas Dudziak <[E

RE: Installation of OJB

2004-02-02 Thread Brendan Richards
I'm not using any. So far I've not used any features that require them but this may change... -Original Message- From: Ralf Bode [mailto:[EMAIL PROTECTED] Sent: 02 February 2004 10:43 To: OJB Users List Subject: RE: Installation of OJB Thanks Brendan, but it doesn´t work

RE: Installation of OJB

2004-02-02 Thread Ralf Bode
27;t want > to deploy all the > test tables with my final app... > > > > -Original Message- > From: Ralf Bode [mailto:[EMAIL PROTECTED] > Sent: 02 February 2004 09:55 > To: OJB Users List > Subject: RE: Installation of OJB > > Hi Brendan, > > yes

RE: Installation of OJB

2004-02-02 Thread Thomas Dudziak
Basically there are two easy ways to getting started, though I don't think they are properly described in a tutorial yet. If you have an existing database that you want to manipulate with OJB, or you like to start with the database then create the Java source code for it, then I suggest you look a

RE: Installation of OJB

2004-02-02 Thread Brendan Richards
it all works, I don't want to deploy all the test tables with my final app... -Original Message- From: Ralf Bode [mailto:[EMAIL PROTECTED] Sent: 02 February 2004 09:55 To: OJB Users List Subject: RE: Installation of OJB Hi Brendan, yes i know, that i need its internal tables perhap

RE: Installation of OJB

2004-02-02 Thread Ralf Bode
to-use-db-sequences.html > > This doc more specifically covers what you need for > deployment: > http://db.apache.org/ojb/deployment.html > > -Original Message- > From: Ralf Bode [mailto:[EMAIL PROTECTED] > Sent: 02 February 2004 08:19 > To: [EMAIL PROTECTED] &

RE: Installation of OJB

2004-02-02 Thread Brendan Richards
TECTED] Subject: Installation of OJB Hi to all, just a question about to install OJB i read, that i have to load the sources and run some build-scripts okay. but is there an easy-way? i only need a build-script for the binary-version of OJB, that "installs" OJB-internal-tables into databa

Installation of OJB

2004-02-02 Thread Ralf Bode
Hi to all, just a question about to install OJB i read, that i have to load the sources and run some build-scripts okay. but is there an easy-way? i only need a build-script for the binary-version of OJB, that "installs" OJB-internal-tables into database. or is there a reason for "building" all