Re: Installation of OJB
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, > > > > 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 equals > and hashcode method > of the persistence capable objects are overridden > (fixed in CVS). But > this doesn't bother your test. Nevertheless you can > try the CVS head. > > regards, > Armin > > > > > --- Armin Waibel <[EMAIL PROTECTED]> schrieb: > > 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 build.properties file. > >> > >>regards, > >>Armin > >> > >>Ralf Bode wrote: > >> > >> > >>>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"); > >>> > >>>Kunde kunde = new Kunde(); > >>>kunde.setNachname("Bode"); > >>>kunde.setVorname("Ralle"); > >>>kunde.setAuto(auto); > >>> > >>>//OJB aktivieren! > >>>broker.beginTransaction(); > >>>broker.store(kunde); > >>>broker.commitTransaction(); > >>> > >>> > >>> > >>>--- Ralf Bode <[EMAIL PROTECTED]> schrieb: > 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() { > >>>> return farbe; > >>>> } > >>>> > >>>> public void setFarbe(String string) { > >>>> farbe = string; > >>>> } > >>>> > >>>>} > >>>> > >>>>CUSTOMER: > >>>>package de.ralle; > >>>> > >>>>import java.io.Serializable; > >>>> > >>>>//my customer! > >>>>public class Kunde implements Serializable{ > >>>> > >>>> > >>>> private String vorname; > >>>> private String nachname; > >>>> > >>>> private Auto auto; > >>>> > >>>> > >>>> public Kunde(){ > >>>> } > >>>> > >>>> public Auto getAuto() { > >>>> return auto; > >>>> } > >>>> > >>>> public String getNachname() { > >>>> return nachname; > >>>> } > >>>> > >>>> public String getVorname() { > >>>> return vorname; > >>>> } > >>>> > >>>> public void setAuto(Auto auto) { > >>>> this.auto = auto; > >>>> } > >>>> > >>>> public void setNachname(String string) { > >>>> nachname = string; > >>>> } > >>>> > >>>> public void setVorname(String string) { > >>>> vorname = string; > >>>> } > >>>> > >>>>} > >>>> > >>>>and XML: > >>>> >>>> class="de.ralle.Kunde" > >>>> table="Kunde" > > >>>> > >>>> >>>> id="1" > >>>> name="id" > >>>> column="id" > >>>> jdbc-type="INTEGER" > >>>> primarykey="true" > >>>> access="anonymous"/> > >>>> >>>> id="2" > >>>> name="vorname" > >>>> column="vorname" > >>>> jdbc-type="VARCHAR"/> > >>>> >>>> id="3" > >>>> name="nachname" > >>>> column="nachname" > >>>> jdbc-type="VARCHAR"/> > >>>> >>>> id="4" > >>>> name="autoId" > >>>> column="autoid" > >>>> jdbc-type="INTEGER" > >>>> access="anonymous"/> > >>>> > >>>> >>>> name="auto" > >>>> class-ref="de.ralle.Auto" > >>>> auto-retrieve="true" > >>>> auto-update="true" > >>>> auto-delete="true"> > >>>> > >>>> > >>>> > >>>> >>>> class="de.ralle.Auto" > >>>> table="auto"> > >>>> >>>> id="1" > >>>> name="id" > >>>> column="id" > >>>> jdbc-type="INTEGER" > >>>> primarykey="true" > === message truncated === __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Mit Yahoo! Suche finden Sie alles: http://suche.yahoo.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installation of OJB
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 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 build.properties file. > > regards, > Armin > > Ralf Bode wrote: > > > 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"); > > > > Kunde kunde = new Kunde(); > > kunde.setNachname("Bode"); > > kunde.setVorname("Ralle"); > > kunde.setAuto(auto); > > > > //OJB aktivieren! > > broker.beginTransaction(); > > broker.store(kunde); > > broker.commitTransaction(); > > > > > > > > --- Ralf Bode <[EMAIL PROTECTED]> schrieb: > 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() { > >>return farbe; > >>} > >> > >>public void setFarbe(String string) { > >>farbe = string; > >>} > >> > >>} > >> > >>CUSTOMER: > >>package de.ralle; > >> > >>import java.io.Serializable; > >> > >>//my customer! > >>public class Kunde implements Serializable{ > >> > >> > >>private String vorname; > >>private String nachname; > >> > >>private Auto auto; > >> > >> > >>public Kunde(){ > >>} > >> > >>public Auto getAuto() { > >>return auto; > >>} > >> > >>public String getNachname() { > >>return nachname; > >>} > >> > >>public String getVorname() { > >>return vorname; > >>} > >> > >>public void setAuto(Auto auto) { > >>this.auto = auto; > >>} > >> > >>public void setNachname(String string) { > >>nachname = string; > >>} > >> > >>public void setVorname(String string) { > >>vorname = string; > >>} > >> > >>} > >> > >>and XML: > >> >>class="de.ralle.Kunde" > >>table="Kunde" > > >> > >> >>id="1" > >>name="id" > >>column="id" > >>jdbc-type="INTEGER" > >>primarykey="true" > >>access="anonymous"/> > >> >>id="2" > >>name="vorname" > >>column="vorname" > >>jdbc-type="VARCHAR"/> > >> >> id="3" > >>name="nachname" > >>column="nachname" > >>jdbc-type="VARCHAR"/> > >> >>id="4" > >>name="autoId" > >>column="autoid" > >>jdbc-type="INTEGER" > >>access="anonymous"/> > >> > >> >>name="auto" > >>class-ref="de.ralle.Auto" > >>auto-retrieve="true" > >>auto-update="true" > >>auto-delete="true"> > >> > >> > >> > >> >>class="de.ralle.Auto" > >>table="auto"> > >> >>id="1" > >>name="id" > >>column="id" > >>jdbc-type="INTEGER" > >>primarykey="true" > >>access="anonymous"/> > >> >>id="2" > >>name="farbe" > >>column="farbe" > >>jdbc-type="VARCHAR" /> > >> > >> > >> > >> > >>THANKS! > >> > >> --- Armin Waibel <[EMAIL PROTECTED]> schrieb: > > 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. > === message truncated === __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Mit Yahoo! Suche finden Sie alles: http://suche.yahoo.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installation of OJB
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"); Kunde kunde = new Kunde(); kunde.setNachname("Bode"); kunde.setVorname("Ralle"); kunde.setAuto(auto); //OJB aktivieren! broker.beginTransaction(); broker.store(kunde); broker.commitTransaction(); --- Ralf Bode <[EMAIL PROTECTED]> schrieb: > 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() { > return farbe; > } > > public void setFarbe(String string) { > farbe = string; > } > > } > > CUSTOMER: > package de.ralle; > > import java.io.Serializable; > > //my customer! > public class Kunde implements Serializable{ > > > private String vorname; > private String nachname; > > private Auto auto; > > > public Kunde(){ > } > > public Auto getAuto() { > return auto; > } > > public String getNachname() { > return nachname; > } > > public String getVorname() { > return vorname; > } > > public void setAuto(Auto auto) { > this.auto = auto; > } > > public void setNachname(String string) { > nachname = string; > } > > public void setVorname(String string) { > vorname = string; > } > > } > > and XML: >class="de.ralle.Kunde" > table="Kunde" > > > id="1" > name="id" > column="id" > jdbc-type="INTEGER" > primarykey="true" > access="anonymous"/> > id="2" > name="vorname" > column="vorname" > jdbc-type="VARCHAR"/> > id="3" > name="nachname" > column="nachname" > jdbc-type="VARCHAR"/> > id="4" > name="autoId" > column="autoid" > jdbc-type="INTEGER" > access="anonymous"/> > > name="auto" > class-ref="de.ralle.Auto" > auto-retrieve="true" > auto-update="true" > auto-delete="true"> > > > >class="de.ralle.Auto" > table="auto"> > id="1" > name="id" > column="id" > jdbc-type="INTEGER" > primarykey="true" > access="anonymous"/> > id="2" > name="farbe" > column="farbe" > jdbc-type="VARCHAR" /> > > > > > THANKS! > > --- Armin Waibel <[EMAIL PROTECTED]> schrieb: > 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-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 with OJB... > > > > > > a short, and last question, > > > wh
Re: Installation of OJB
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() { return farbe; } public void setFarbe(String string) { farbe = string; } } CUSTOMER: package de.ralle; import java.io.Serializable; //my customer! public class Kunde implements Serializable{ private String vorname; private String nachname; private Auto auto; public Kunde(){ } public Auto getAuto() { return auto; } public String getNachname() { return nachname; } public String getVorname() { return vorname; } public void setAuto(Auto auto) { this.auto = auto; } public void setNachname(String string) { nachname = string; } public void setVorname(String string) { vorname = string; } } and XML: THANKS! --- Armin Waibel <[EMAIL PROTECTED]> schrieb: > 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-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 with OJB... > > > > a short, and last question, > > why doesn´t OJB1.0.rc5 not deal with > anonymous-keys > > i thought its a nice feature! > > > > greetings ralf > > > > > > --- Armin Waibel <[EMAIL PROTECTED]> schrieb: > > 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 > >>achieve this. All > >>anonymous keys are held in an internal map using > the > >>object itself as > >>key. Reading will be successful, but when the > object > >>e.g. will be > >>serialized and then returned to OJB the anonymous > PK > >>field will never be > >>found (object does not match a key), its only > >>possible to extract the FK > >>from the associated reference object. > >>Thus I think anonymous keys will only work in > >>conjunction with 1:1 > >>references. > >>I don't write the 'anonymous-key' stuff, so maybe > I > >>overlooked an > >>important argument. > >> > >>regards, > >>Armin > >> > >> > >> > >>>but only the little thing > >>>froeign-key is null in my case... > >>> > >>>did you know if this sample is available? > >>>i didn´t found it in src-distribution. > >>> > >>>thanks alot! > >>> > >>> --- Armin Waibel <[EMAIL PROTECTED]> schrieb: > > >> > >>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.apache.org/ojb/tutorial3.html#Mapping > >> > >>1:1 > >> > >>>>associations). As recently as your test pass > sta
Re: Installation of OJB
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 1.0.rc5..? now i am really confused :-) greetings ralf --- Brian McCallister <[EMAIL PROTECTED]> schrieb: > 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. > > -Brian > > On Feb 3, 2004, at 6:10 AM, Armin Waibel wrote: > > > 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.apache.org/ojb/tutorial3.html#Mapping 1:1 > > > associations). As recently as your test pass start > to tweak ;-) > > > > regards, > > Armin > > > > > > Ralf Bode wrote: > >> 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 where anonymous too, > >> is that the matter? > >> but i don´t think so, because > >> for car and customer a id is "generated". > >> But only!!! the reffered id (in customer for car > is "null") > >> ...strangely... isn´t it ? > >> perhaps i can send it to list / to you? > >> (i asked, because i will not blow up list > >> with my (i think) foolishness) > >> thanks for your patience! > >> ralf > >> --- Armin Waibel <[EMAIL PROTECTED]> schrieb: > > 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.AnonymousFieldsTest. > >>> > >>> regards, > >>> Armin > >>> > >>> > >>>> 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 "customer" and his car... > >>>> has anyone a "runnig"-case for an idot, like > me? > >>>> > >>>> thanks! > >>>> > >>>> > >>>> > >>>> > >>>> --- Brian McCallister > >>>> <[EMAIL PROTECTED]> schrieb: > > >>> > >>> 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); > >>>>> broker.store(cu); > >>>>> > >>>>> -Brian > >>>>> > >>>>> On Feb 2, 2004, at 3:13 PM, Ralf Bode wrote: > >>>>> > >>>>> > >>>>> > &
Re: Installation of OJB
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 with OJB... a short, and last question, why doesn´t OJB1.0.rc5 not deal with anonymous-keys i thought its a nice feature! greetings ralf --- Armin Waibel <[EMAIL PROTECTED]> schrieb: > 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 > achieve this. All > anonymous keys are held in an internal map using the > object itself as > key. Reading will be successful, but when the object > e.g. will be > serialized and then returned to OJB the anonymous PK > field will never be > found (object does not match a key), its only > possible to extract the FK > from the associated reference object. > Thus I think anonymous keys will only work in > conjunction with 1:1 > references. > I don't write the 'anonymous-key' stuff, so maybe I > overlooked an > important argument. > > regards, > Armin > > > > but only the little thing > > froeign-key is null in my case... > > > > did you know if this sample is available? > > i didn´t found it in src-distribution. > > > > thanks alot! > > > > --- Armin Waibel <[EMAIL PROTECTED]> schrieb: > > 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.apache.org/ojb/tutorial3.html#Mapping > 1:1 > >> > >>associations). As recently as your test pass start > >>to tweak ;-) > >> > >>regards, > >>Armin > >> > >> > >>Ralf Bode wrote: > >> > >>>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 where anonymous too, > >>>is that the matter? > >>>but i don´t think so, because > >>>for car and customer a id is "generated". > >>> > >>>But only!!! the reffered id > >>>(in customer for car is "null") > >>> > >>>...strangely... isn´t it ? > >>> > >>>perhaps i can send it to list / to you? > >>>(i asked, because i will not blow up list > >>> with my (i think) foolishness) > >>> > >>>thanks for your patience! > >>>ralf > >>> --- Armin Waibel <[EMAIL PROTECTED]> schrieb: > > >> > >>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.AnonymousFieldsTest. > >>>> > >>>>regards, > >>>>Armin > >>>> > >>>> > >>>> > >>>>>but same... > >>>>>customer is in DB, car not! > >>>>>:-( > >>>>> > >>>>>i have read in ar
Re: Installation of OJB
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 you know if this sample is available? i didn´t found it in src-distribution. thanks alot! --- Armin Waibel <[EMAIL PROTECTED]> schrieb: > 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.apache.org/ojb/tutorial3.html#Mapping 1:1 > > associations). As recently as your test pass start > to tweak ;-) > > regards, > Armin > > > Ralf Bode wrote: > > 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 where anonymous too, > > is that the matter? > > but i don´t think so, because > > for car and customer a id is "generated". > > > > But only!!! the reffered id > > (in customer for car is "null") > > > > ...strangely... isn´t it ? > > > > perhaps i can send it to list / to you? > > (i asked, because i will not blow up list > > with my (i think) foolishness) > > > > thanks for your patience! > > ralf > > --- Armin Waibel <[EMAIL PROTECTED]> schrieb: > > 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.AnonymousFieldsTest. > >> > >>regards, > >>Armin > >> > >> > >>>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 "customer" and his car... > >>>has anyone a "runnig"-case for an idot, like me? > >>> > >>>thanks! > >>> > >>> > >>> > >>> > >>> --- Brian McCallister > >>><[EMAIL PROTECTED]> schrieb: > > >> > >>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); > >>>>broker.store(cu); > >>>> > >>>>-Brian > >>>> > >>>>On Feb 2, 2004, at 3:13 PM, Ralf Bode wrote: > >>>> > >>>> > >>>> > >>>>>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: > >>>>> >>>>> nam
Re: Installation of OJB
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 where anonymous too, is that the matter? but i don´t think so, because for car and customer a id is "generated". But only!!! the reffered id (in customer for car is "null") ...strangely... isn´t it ? perhaps i can send it to list / to you? (i asked, because i will not blow up list with my (i think) foolishness) thanks for your patience! ralf --- Armin Waibel <[EMAIL PROTECTED]> schrieb: > 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.AnonymousFieldsTest. > > regards, > Armin > > > 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 "customer" and his car... > > has anyone a "runnig"-case for an idot, like me? > > > > thanks! > > > > > > > > > > --- Brian McCallister > > <[EMAIL PROTECTED]> schrieb: > > 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); > >>broker.store(cu); > >> > >>-Brian > >> > >>On Feb 2, 2004, at 3:13 PM, Ralf Bode wrote: > >> > >> > >>>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: > >>> >>> name="car" > >>> class-ref="de.ralle.Car" > >>> auto-retrive="true" > >>> auto-update="true" > >>> auto-delete="true"> > >>> > >>> > >>> > >>>now i have a car and a customer, > >>>but custumer.carId is "null" in database... > >>>of course carId is anonym too! ... > >>> > >>>any idea? or am i to silly > >>>and i must do pure sql ... as a penalty... ? :-) > >>> > >>> > >>>in table customer is: > >>>CREATE TABLE CUSTOMER > >>>( > >>>ID INT PRIMARY KEY AUTO_INCREMENT, > >>>CARID INT, > >>>FOREIGN KEY (CARID) REFERENCES CAR(ID) > >>>); > >>> > >>>thanks! > >>> > >>> --- Ralf Bode <[EMAIL PROTECTED]> schrieb: > > >> > >>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 for your patience. > >>>>greetings! > >>>> > >>>> > >>>> > >>>> > >>>>>On the FK thing, if you do not use anonymous > >> > >>FK's > >> > >
Re: Installation of OJB
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 "customer" and his car... has anyone a "runnig"-case for an idot, like me? thanks! --- Brian McCallister <[EMAIL PROTECTED]> schrieb: > 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); > broker.store(cu); > > -Brian > > On Feb 2, 2004, at 3:13 PM, Ralf Bode wrote: > > > 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: > > > name="car" > > class-ref="de.ralle.Car" > > auto-retrive="true" > > auto-update="true" > > auto-delete="true"> > > > > > > > > now i have a car and a customer, > > but custumer.carId is "null" in database... > > of course carId is anonym too! ... > > > > any idea? or am i to silly > > and i must do pure sql ... as a penalty... ? :-) > > > > > > in table customer is: > > CREATE TABLE CUSTOMER > > ( > > ID INT PRIMARY KEY AUTO_INCREMENT, > > CARID INT, > > FOREIGN KEY (CARID) REFERENCES CAR(ID) > > ); > > > > thanks! > > > > --- Ralf Bode <[EMAIL PROTECTED]> schrieb: > > 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 for your patience. > >> greetings! > >> > >> > >> > >>> On the FK thing, if you do not use anonymous > FK's > >>> the ID's need to be > >>> managed manually, as well as the references. I > >> tend > >>> to recommend using > >>> anonymous keys for FK relationships because it > is > >>> very easy to forget > >>> this. > >>> > >>> -Brian > >>> > >>> > >>> > >>> > >> > > > - > >>> To unsubscribe, e-mail: > >>> [EMAIL PROTECTED] > >>> For additional commands, e-mail: > >>> [EMAIL PROTECTED] > >>> > >> > >> > > > __ > >> > >> Gesendet von Yahoo! Mail - http://mail.yahoo.de > >> Mit Yahoo! Suche finden Sie alles: > >> http://suche.yahoo.de > >> > >> > > > - > >> To unsubscribe, e-mail: > >> [EMAIL PROTECTED] > >> For additional commands, e-mail: > >> [EMAIL PROTECTED] > >> > > > > > __ > > > > Gesendet von Yahoo! Mail - http://mail.yahoo.de > > Mit Yahoo! Suche finden Sie alles: > http://suche.yahoo.de > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Mit Yahoo! Suche finden Sie alles: http://suche.yahoo.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installation of OJB
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 custumer.carId is "null" in database... of course carId is anonym too! ... any idea? or am i to silly and i must do pure sql ... as a penalty... ? :-) in table customer is: CREATE TABLE CUSTOMER ( ID INT PRIMARY KEY AUTO_INCREMENT, CARID INT, FOREIGN KEY (CARID) REFERENCES CAR(ID) ); thanks! --- Ralf Bode <[EMAIL PROTECTED]> schrieb: > 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 for your patience. > greetings! > > > > > On the FK thing, if you do not use anonymous FK's > > the ID's need to be > > managed manually, as well as the references. I > tend > > to recommend using > > anonymous keys for FK relationships because it is > > very easy to forget > > this. > > > > -Brian > > > > > > > > > - > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > __ > > Gesendet von Yahoo! Mail - http://mail.yahoo.de > Mit Yahoo! Suche finden Sie alles: > http://suche.yahoo.de > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Mit Yahoo! Suche finden Sie alles: http://suche.yahoo.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installation of OJB
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 for your patience. greetings! > On the FK thing, if you do not use anonymous FK's > the ID's need to be > managed manually, as well as the references. I tend > to recommend using > anonymous keys for FK relationships because it is > very easy to forget > this. > > -Brian > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Mit Yahoo! Suche finden Sie alles: http://suche.yahoo.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installation of OJB
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. but carId in table customer is ="0". (car has a new PK become by db) in xml i did this in customer-describtion: in class Customer i have this: Car car; int carId; any idea? i watched docu,in internet, saw tutorial3 but it is not deliverd with OJB. so please not be angry (because of lots questions) (i last worked with 0.94... sorry) Thanks advice! Ralf --- Brian McCallister <[EMAIL PROTECTED]> schrieb: > 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 will > autoincrement. > > > public class IncorrectThing > { > public int pk; > } > > public class CorrentThing > { > public Integer pk; > } > > IncorrectThing it = new IncorrectThing(); > CorrectThing ct = new CorrectThing(); > > If "it" is stored it has a valid value for it.pk --> > 0 > If "ct" is stored it has null for ct.pk, so will > have a value assigned. > > -Brian > > On Feb 2, 2004, at 11:47 AM, Ralf Bode wrote: > > > 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 dont set up > > the PK. > > > > thanks again for a quick ;-) > > advice > > > > ralf > > > > --- "Larry V. Streepy, Jr." > > <[EMAIL PROTECTED]> schrieb: > 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 creates a minor dependency between the > two > >> projects, but > >> that's fairly easy to manage. I have no need for > >> setting up and > >> utilizing torque in my project (I use Axgen to > >> generate everything from > >> UML), so it seemed like major complications to > solve > >> a simple problem. > >> > >> YMMV. > >> Larry. > >> > >> 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 > >>> most of the time people don't need them (though > >> the hi/lo sequence > >>> table is needed enough that this may be > incorrect, > >> since it is the > >>> default sequence manager). > >>> > >>> What are thoughts on including the torque > >> generator stuff in > >>> ojb-blank? The ojb-core schema is already > included > >> in the src/schema > >>> directory, but the build-torque and torque > related > >> jars are not > >>> included. Now that I think about it, I have done > >> this for all of the > >>> projects I have built around ojb-blank bits > >> anyway, so that is a > >>> certain argument in favor. > >>> > >>> In the short term, Thomas D has has a nice > little > >> walkthrough on > >>> getting torque from OJB setup in the xdoclet > docs, > >> but that is sort of > >>> hidden =) (note, we should probably move that > into > >> its own HOWTO). > >>> > >>> -Brian > >>> > >>> On Feb 2, 2004, at 3:19 AM, Ralf Bode wrote: > >>
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 set the PK in my code? customer.setId(123); i described it in XML primarykey="true" autoincrement="true" but got Errsos, when i dont set up the PK. thanks again for a quick ;-) advice ralf --- "Larry V. Streepy, Jr." <[EMAIL PROTECTED]> schrieb: > 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 creates a minor dependency between the two > projects, but > that's fairly easy to manage. I have no need for > setting up and > utilizing torque in my project (I use Axgen to > generate everything from > UML), so it seemed like major complications to solve > a simple problem. > > YMMV. > Larry. > > 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 > > most of the time people don't need them (though > the hi/lo sequence > > table is needed enough that this may be incorrect, > since it is the > > default sequence manager). > > > > What are thoughts on including the torque > generator stuff in > > ojb-blank? The ojb-core schema is already included > in the src/schema > > directory, but the build-torque and torque related > jars are not > > included. Now that I think about it, I have done > this for all of the > > projects I have built around ojb-blank bits > anyway, so that is a > > certain argument in favor. > > > > In the short term, Thomas D has has a nice little > walkthrough on > > getting torque from OJB setup in the xdoclet docs, > but that is sort of > > hidden =) (note, we should probably move that into > its own HOWTO). > > > > -Brian > > > > On Feb 2, 2004, at 3:19 AM, Ralf Bode wrote: > > > >> 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 ? > >> > >> thanks for advice! > >> > >> greetings > >> ralf > >> > >> > __ > >> > >> Gesendet von Yahoo! Mail - http://mail.yahoo.de > >> Mit Yahoo! Suche finden Sie alles: > http://suche.yahoo.de > >> > >> > - > >> To unsubscribe, e-mail: > [EMAIL PROTECTED] > >> For additional commands, e-mail: > [EMAIL PROTECTED] > >> > >> > > > > > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Mit Yahoo! Suche finden Sie alles: http://suche.yahoo.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installation of OJB
okay... let me ask, you do not have any of its internal-tables? in my case i need only "makePersisten" and getCollectionByQuery, and getObjectByQuery really, i wondered, that the tables are empty! (since now i use the created core-obj.sql to load it in my database... what a dirty workaround, isn´t it?:-) thank you!!! you made me happy! :-) but, why is this not told in anyway on the web-page? --- Brendan Richards <[EMAIL PROTECTED]> schrieb: > 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! > but this would be the way i likded ;-) > > how do you get your internal tables? > > --- Brendan Richards <[EMAIL PROTECTED]> schrieb: > > > Looking in the source tree, the torque schema files > > are in src/schema. > > There are three files: > > ojbcore-schema.xml > > ojbtest-schema.xml > > ojbtest-data.xml > > > > There seems to be loads of targets in > > ./build-torque.xml but none of > > them seem to specifically build just the internal > > tables, they seem to > > do a wildcard *-schema.xml. > > > > Perhaps if you remove the two test files and run a > > build you'll only get > > the core tables created? > > I'd be interested to see if this works. I myself > > would like to see a > > specific core-only build target. Although it's > nice > > to see the junit > > tests run and verify that 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 > > > > perhaps my 1. mail was not easy to understand. > > sorry for that. > > > > I installed ojb like suggested in "Getting > started" > > so i have a database called "ojb" > > which is full of tables i do not need! > > > > i am searching for "template", where > > i can define my-project-schema.xml > > > > after runing ant(on that template) i have a > database > > "my-project" > > which has only obj- and my tables. > > > > i think, that would be the most interessting > > for users, which like the brilliant way to work > with > > broker. i like it really, but i dont like the > whole > > tables (zoo,reptile, etc) :-) > > > > perhaps there is an tutorial, i didnt found it > yet! > > > > thanks for advice! > > > > greetings > > ralf > > > > > > --- Brendan Richards <[EMAIL PROTECTED]> > > schrieb: > > > You only need the internal tables to use certain > > > features. > > > > > > I'm using a database sequence for my primary > keys > > > and I've not needed > > > any of the other stuff yet so all I've done is > > > included all the jars > > > from the binary dist into my classpath along > with > > a > > > copy of the > > > repository xml files rewritten for my app. > > > > > > http://db.apache.org/ojb/howto-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] > > > 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 > > > database. > > > > > > or is there a reason for "building" all ? > > > > > > thanks for advice! > > > > > > greetings > > > ralf > > > > > > > > >
RE: Installation of OJB
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 <[EMAIL PROTECTED]> schrieb: > 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 at Druid > (http://sourceforge.net/projects/druid) which allows > you to import the > database/create the database, and then generates OJB > Java code for it. > > 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 repository > descriptor (repository_user.xml) and a corresponding > torque database > schema. Details on the module and the usage of the > torque schema can be > found in the corresponding documentation > (xdoclet-module.html). I suggest > you use the CVS version or at least 1.0rc5 if you > want to work this way. > > Tom > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Mit Yahoo! Suche finden Sie alles: http://suche.yahoo.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installation of OJB
Thanks Brendan, but it doesn´t work! but this would be the way i likded ;-) how do you get your internal tables? --- Brendan Richards <[EMAIL PROTECTED]> schrieb: > Looking in the source tree, the torque schema files > are in src/schema. > There are three files: > ojbcore-schema.xml > ojbtest-schema.xml > ojbtest-data.xml > > There seems to be loads of targets in > ./build-torque.xml but none of > them seem to specifically build just the internal > tables, they seem to > do a wildcard *-schema.xml. > > Perhaps if you remove the two test files and run a > build you'll only get > the core tables created? > I'd be interested to see if this works. I myself > would like to see a > specific core-only build target. Although it's nice > to see the junit > tests run and verify that 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 > > perhaps my 1. mail was not easy to understand. > sorry for that. > > I installed ojb like suggested in "Getting started" > so i have a database called "ojb" > which is full of tables i do not need! > > i am searching for "template", where > i can define my-project-schema.xml > > after runing ant(on that template) i have a database > "my-project" > which has only obj- and my tables. > > i think, that would be the most interessting > for users, which like the brilliant way to work with > broker. i like it really, but i dont like the whole > tables (zoo,reptile, etc) :-) > > perhaps there is an tutorial, i didnt found it yet! > > thanks for advice! > > greetings > ralf > > > --- Brendan Richards <[EMAIL PROTECTED]> > schrieb: > > You only need the internal tables to use certain > > features. > > > > I'm using a database sequence for my primary keys > > and I've not needed > > any of the other stuff yet so all I've done is > > included all the jars > > from the binary dist into my classpath along with > a > > copy of the > > repository xml files rewritten for my app. > > > http://db.apache.org/ojb/howto-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] > > 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 > > database. > > > > or is there a reason for "building" all ? > > > > thanks for advice! > > > > greetings > > ralf > > > > > __ > > > > Gesendet von Yahoo! Mail - http://mail.yahoo.de > > Mit Yahoo! Suche finden Sie alles: > > http://suche.yahoo.de > > > > > - > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > - > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > __ > > Gesendet von Yahoo! Mail - http://mail.yahoo.de > Mit Yahoo! Suche finden Sie alles: > http://suche.yahoo.de > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Mit Yahoo! Suche finden Sie alles: http://suche.yahoo.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Installation of OJB
Hi Brendan, yes i know, that i need its internal tables perhaps my 1. mail was not easy to understand. sorry for that. I installed ojb like suggested in "Getting started" so i have a database called "ojb" which is full of tables i do not need! i am searching for "template", where i can define my-project-schema.xml after runing ant(on that template) i have a database "my-project" which has only obj- and my tables. i think, that would be the most interessting for users, which like the brilliant way to work with broker. i like it really, but i dont like the whole tables (zoo,reptile, etc) :-) perhaps there is an tutorial, i didnt found it yet! thanks for advice! greetings ralf --- Brendan Richards <[EMAIL PROTECTED]> schrieb: > You only need the internal tables to use certain > features. > > I'm using a database sequence for my primary keys > and I've not needed > any of the other stuff yet so all I've done is > included all the jars > from the binary dist into my classpath along with a > copy of the > repository xml files rewritten for my app. > http://db.apache.org/ojb/howto-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] > 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 > database. > > or is there a reason for "building" all ? > > thanks for advice! > > greetings > ralf > > __ > > Gesendet von Yahoo! Mail - http://mail.yahoo.de > Mit Yahoo! Suche finden Sie alles: > http://suche.yahoo.de > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Mit Yahoo! Suche finden Sie alles: http://suche.yahoo.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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 database. or is there a reason for "building" all ? thanks for advice! greetings ralf __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Mit Yahoo! Suche finden Sie alles: http://suche.yahoo.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
thread-safe
Hi, just a question about thread-safty. i use OJB to store business-objects in a webapp. in my struts-actions i use my own class called "OJBDelegate". Its methods are not! delcared with synchronized. now my question: is ojb threadsafe? if two or more "struts-actions" call the same method of my ojb-class, what should happend? thinking on transactions etc. greetings __ Gesendet von Yahoo! Mail - http://mail.yahoo.de Mit Yahoo! Suche finden Sie alles: http://suche.yahoo.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]