Re: Database Update

2008-10-01 Thread Hans Novak
Armin Waibel schrieb: how can i update the Database, if i change my Java-sourcecode and with that the database structure, without loosing any data. Until now i use the mysql command to import the SQL-Ascii File, created from OJB with ant. But this deletes first all tables. The upcoming ve

ojb do not store

2008-06-04 Thread Hans Novak
Hi, i have found a lot of problems with ojb, if i try this: /** * @ojb.class table = "PRODUCT_STOCK" * @DOC this is a description */ public class ProductStock the "@DOC" statement cant be there, because the ant script does it not recognize. However, this i can solve self, but another problem i

Database Update

2008-04-30 Thread Hans Novak
Hi, how can i update the Database, if i change my Java-sourcecode and with that the database structure, without loosing any data. Until now i use the mysql command to import the SQL-Ascii File, created from OJB with ant. But this deletes first all tables. Hans ---

How open 2 different Databases ?ope

2008-04-29 Thread Hans Novak
Hi, my prg works fine with ojb. But now i have to open 2 different Databases (on the same host), because i want to import/export something. How can i do that ? I have only one "build.properties" file !? Hans - To unsubscribe,

Re: Antwort: Re: Antwort: SQL Input from user

2008-04-28 Thread Hans Novak
Mario Curcija schrieb: Hi Hans, You are right about that second one. It does not suit your needs. On the other hand, the first one was actually what you've needed. Please check it again: Yes, sorry, i find it right now - a use the broker and anything else is pure java.sql* Thats fine.

Re: Antwort: SQL Input from user

2008-04-28 Thread Hans Novak
Mario Curcija schrieb: 4.22. Is it possible to perform my own sql-queries in OJB? http://db.apache.org/ojb/docu/faq.html#performSQL Hi, ok, that is a beginning ;) But in the doc is described Query q2 = QueryFactory.newQuery(Article.class, sql); how can i use this, if i dont know,

SQL Input from user

2008-04-24 Thread Hans Novak
Hi, my app is using the ojb mapper. Now we have the wish, that an user can type some basic sql instrucktions in a text field, what will be executed and shown in table. How can be realized this, with ojb ? Hans - To unsubscrib

Re: Antwort: Java DB Mapper

2008-04-22 Thread Hans Novak
Hi again, my "build.properties" file looks like below. What i must change for javaDb ? Hans $ cat ./build.properties jcdAlias=default databaseName=abc databaseUser=xxx databasePassword=xxx dbmsName=MySQL jdbcLevel

Re: Antwort: Java DB Mapper

2008-04-22 Thread Hans Novak
Mario Curcija schrieb: Hi Hans, just download latest OJB release (1.0.4) and look for the "profile" directory. You should find all ".profile" files in it. Here is derby.profile in SVN. http://svn.apache.org/viewvc/db/ojb/tags/OJB_1_0_4/profile/derby.profile?view=markup Hi, thanks. now i f

Re: Antwort: Java DB Mapper

2008-04-17 Thread Hans Novak
Mario Curcija schrieb: Hi, is there an ojb Mapper for the java DB (JDK 6.0) available ? (and ... Just modify build.properties in order to switch from default "hsqldb" profile to "derby". If necessary modify "profile/derby.profile" as well to match your environment. Best regards, M

Java DB Mapper

2008-04-17 Thread Hans Novak
Hi, is there an ojb Mapper for the java DB (JDK 6.0) available ? (and where?) Hans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Field index

2007-11-23 Thread Hans Novak
Hi again, i need to index some fields in table table. If i use "indexed="true" doclet on 2 Fields, ojb generate me an combined Index of this 2 fields. But i need 2 Indexes for 2 seperate fields. Hans - To unsubscribe, e-mai

search without some special characters

2007-11-23 Thread Hans Novak
Hi Ng, i have in my db round about 5000 phone numbers in the manner [prefix]-[number] [prefix] [number] [prefix]/[number] and maybe some other cases. i have a telecom system, who gives me the numer like [prefix][number] (without any other characters) how can i search in my db to find the right

problem with updateCollectionReferences

2007-11-22 Thread Hans Novak
Hi Allessandro, Hi Ng, it seems to me, that an object with a lot of collections and many other objects will not be saved right into the db. If i remove something from the collection tree of this object, it will not be removed from the db. The object tree is very nested... I have debug everythi

Re: MAX statement in ojb (or mandragora)

2007-11-16 Thread Hans Novak
Danilo Tommasina schrieb: Hi, simply use a ReportQuery and enter "max( colName )" as column Ohh... i'm stupid ;-) Thx, it works!! Hans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTE

MAX statement in ojb (or mandragora)

2007-11-16 Thread Hans Novak
Hi NG, Hi Alessandro :-) How can i askt the db for a max value, like select max(filed) from table; Hans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: how to clear cache

2007-09-26 Thread Hans Novak
Hi Allesandro, i think im stupid - or - how we in germany say: i dont see the wood for the trees ... ;-) im my (ojb) dao class i use public class PartnerFactoryCore { private PersistenceBroker broker = null; static Logger logger = Logger.getLogger("osf"); public PartnerFactoryCore

Re: TO: Alessandro Colantoni: Problems with "LogicSqlCondition"

2007-09-26 Thread Hans Novak
Ok, this helps. thx Hans Alessandro Colantoni schrieb: Hi Hans I think that in an other post I got mistake. If you want all beginning with r you have to put RIGHTLIKE. when you use RIGHTLIKE just updated a criteria in this way criteria.addLike(field,value+"%"); with leftLike criteria.

Re: how to clear cache

2007-09-25 Thread Hans Novak
PersistenceBroker.clearCache(); to evict the whole cache yes, this works, but will increase the database access a lot. You speaks about the possibility, that ojb and mandragora can use the same PB ... how ? I have a dao class, with the broker. This broker is private and will not used in an

how to clear cache

2007-09-25 Thread Hans Novak
Hi Ng, i use allesandros mandragora with ojb in "mixed-mode". It is working fine, but when i remove objects with mandragora and then read the again with ojb, i get the cached object back, not the one, what hase been saved. When i restart my app, then i get the right object. So, how can i clear

TO: Alessandro Colantoni: Problems with "LogicSqlCondition"

2007-09-25 Thread Hans Novak
Hi Allesandro, i have a question to the "LogicSqlCondition" When i ask mandragora with Partner.class, new LogicSqlCondition("NAME","leftlike","r") i get not the object, whats beginnig with r, but one, who have an "r" somewhere in the name (and only 1 object, but there are more with "r" i

Re: storing objects

2007-09-14 Thread Hans Novak
just save you to to deal with transaction, create broker, closing an other annoying things that are always the same. Alessandro On 9/14/07, Hans Novak <[EMAIL PROTECTED]> wrote: oh... ok :-) but when i write Collection collection = bd.findCollectionByLogicCon

Re: storing objects

2007-09-14 Thread Hans Novak
oh... ok :-) but when i write Collection collection = bd.findCollectionByLogicCondition( Partner.class, new LogicSqlCondition("NAME","like","r*") ); i get a collection of partners, who have a "r" somewhere in his name, not partners, who begins w

Re: storing objects

2007-09-14 Thread Hans Novak
Hi Allessandro, first of all - it is working and looks great. I try first the findCollectionByOrValues. Is there a chance, that it would search not by equal '=', but by "like" operator ? Hans - To unsubscribe, e-mail: [E

Re: storing objects

2007-09-13 Thread Hans Novak
ll of them from the inside the jar Regards Alessandro On 9/13/07, Hans Novak <[EMAIL PROTECTED]> wrote: Hi, When i add the mandragora jar to my project and start my standard main class, i get this error when calling: broker = PersistenceBrokerFactory.defaultPersis

Re: storing objects

2007-09-13 Thread Hans Novak
Hi, When i add the mandragora jar to my project and start my standard main class, i get this error when calling: broker = PersistenceBrokerFactory.defaultPersistenceBroker(); org.apache.ojb.broker.PBFactoryException: There was no 'default-connection' attribute enabled in the jdbc connect

Re: storing objects

2007-09-13 Thread Hans Novak
Hi Allesandro, first of all 2. questions: if it works together with ojb, why i get an error, if i want to start my standard app, when mandragora.jar is included in classpath of my app ? (everything else is like it was). I get an "no default-connection" error. I must alway add the lib, if i w

Re: storing objects

2007-09-13 Thread Hans Novak
at web-app. I will change it. I always work with web-app. So I will appreciate if , when you make it work , write a small quickstart for Swing. I keep here to help. Regards On 9/13/07, Hans Novak <[EMAIL PROTECTED]> wrote: Alessandro Colantoni schrieb: HI, I upload a new release a

Re: storing objects

2007-09-12 Thread Hans Novak
Alessandro Colantoni schrieb: HI, I upload a new release and improved a bit documentation. I solved (I think) the problem noticed by Hans, so it is not need put the quartz servlet in the web.xml, and it should work in no web application. I hope this helps you Hans. Hi Alessandro, i have try

Re: storing objects

2007-09-12 Thread Hans Novak
dify it to not instance it if not explicitly invoked On 9/12/07, Hans Novak <[EMAIL PROTECTED]> wrote: Hi, i have try your project. I have merged it with the ojb_blank project. (the jar file into the lib dir, the properties file in project root. when i do a BD bd = ServiceLoc

Re: storing objects

2007-09-12 Thread Hans Novak
e other methods and sharing On 9/12/07, Hans Novak <[EMAIL PROTECTED]> wrote: aha .!? H... is the "mandragora" Project a part of the ojb project ? How looks ist for the future with it ? I ask this, because, i dontwant to use it and sometime it will be cancel'e

Re: storing objects

2007-09-12 Thread Hans Novak
Armin Waibel schrieb: It's how OJB currently work. But I agree this is not the behavior a user expects when using a "removal aware" collection and above all the odmg-api implementation detects the removed/orphan objects and delete them. OJB (PB-api) ignore the objects detected by the removal

Re: storing objects

2007-09-12 Thread Hans Novak
PROTECTED]> wrote: On 9/12/07, Hans Novak <[EMAIL PROTECTED]> wrote: Hi, i am not shure, but is ist correct when i have an object, witch is a tree of some other objects (colletions) and i delete a part of the tree and then store the hole object (tree) - in the database the

Re: ojb_blank problem

2007-09-12 Thread Hans Novak
Hi, no, i have no attachments, only a clear textmail without any html/whatever character, written from thunderbird. here the copy of the mail: - snip - Hallo Armin, Dein Name klang extrem "german", deshalb hatte ich auch gefragt

storing objects

2007-09-12 Thread Hans Novak
Hi, i am not shure, but is ist correct when i have an object, witch is a tree of some other objects (colletions) and i delete a part of the tree and then store the hole object (tree) - in the database the deleted object will also be deleted ? Everything works fine, when i store or update the

Re: ojb_blank problem

2007-09-12 Thread Hans Novak
Have you got my mail ? Hans Armin Waibel schrieb: Hans Novak wrote: Armin Waibel schrieb: Think this is problem caused by xdoclet itself, because the error starts with error: xjavadoc.TokenMgrError: I suppose you need a Java5/6 compatible xdoclet version (xjavadoc). hmmm... where can i

Re: ojb_blank problem

2007-09-05 Thread Hans Novak
Armin Waibel schrieb: Think this is problem caused by xdoclet itself, because the error starts with error: xjavadoc.TokenMgrError: I suppose you need a Java5/6 compatible xdoclet version (xjavadoc). hmmm... where can i get it ? I use under Linux the latest SUN Java SDK with eclipse and the l

Re: ojb_blank problem

2007-09-04 Thread Hans Novak
Is there nobody, who can help me ? If there is no solution for this (in my view - ojb Bug) i must cancel ojb and migrate to hibernate... (what i dont like) Hans Hans Novak schrieb: Hi, i need help to run the ojb_blank projekt (i try with mysql & hsql, same errors) If i configure it

ojb_blank problem

2007-08-29 Thread Hans Novak
Hi, i need help to run the ojb_blank projekt (i try with mysql & hsql, same errors) If i configure it like the tutorial says, i get in eclipse some errors: first, i get a lot of errors like this: [ojbdoclet] 2007-08-29 13:35:28,017 [main] INFO xdoclet.XDocletMain.start - Running [ojbdoclet

Re: howto query this

2006-01-19 Thread Hans Novak
Jakob Braeuchi schrieb: hi hans, the repository_internal contains only ojb internal classes. please post the repository that defines your classes. oh im sorry. I hope, this is the right one. I have an ant script, what create this Files automaticly, so i dont look in it, because it is worki

Re: howto query this

2006-01-19 Thread Hans Novak
Hello Thomas (and Jakob) Thomas Franke schrieb: I'll take a closer look to your statements and tables and try it. Did you publish all your terms so that I can find them into the previous mails? I'm not shure. So her are my classes and the repository: I hope, thats what you need. Hans pac

Re: howto query this

2006-01-19 Thread Hans Novak
Thomas Franke schrieb: Hans Novak wrote: How can i use the ReportQueryByCriteria with more then one class, or is it a chance to give the broker a native SQL script, without a class ? Maybe in this case you need a special class with your preferred reference descriptors? Can you

Re: howto query this

2006-01-18 Thread Hans Novak
; ReportQueryByCriteria q = QueryFactory.newReportQuery(Calls.class, crit); q.setAttributes(new String[]{"count(*)"}); Iterator iter = broker.getReportQueryIteratorByQuery(q); as an alternative (if you're only interested in the count) you can use: int count = broker.getCount(q); H

Re: howto query this

2006-01-18 Thread Hans Novak
Hi, yes, this was my first way too. But the "addSql" will insert this sql script after "select ... from .. [here will be inserted]" Hans Thomas Franke schrieb: Hi Hans, PLEASE PLEASE HELP ME ! How about to use ReportQueryByCriteria and the Criteria#addSql method? I think it's the

Re: howto query this

2006-01-18 Thread Hans Novak
define all your classes and their relationships in the repository.xml . and then you could execute a report query selecting count(*). hth jakob Hans Novak schrieb: Hi, i try many hours (without a result) to query this sql statement: SELECT count(*) FROM CALLS c, PHONE_NUMBER p, RFTELCO r

howto query this

2006-01-18 Thread Hans Novak
Hi, i try many hours (without a result) to query this sql statement: SELECT count(*) FROM CALLS c, PHONE_NUMBER p, RFTELCO r WHERE c.PHONE_NUMBER_ID = p.PHONE_NUMBER_ID AND p.RF_TELKO_ID=r.RF_TELKO_ID AND r.RF_TELKO_ID =65; Java Classes are CALLS, PHONE_NUMBER an RFTELCO. PLEASE PLEASE

Cache Objects

2005-12-14 Thread Hans Novak
Hi, i read some data of a mysql database. When a change and save a record, it will be done right, but: when i walk forward and back to the record, it will shown the old - unchanged one. When i close the app and start again, it will shown the right changed record. I go forward like this (part

Re: repository entries

2005-11-30 Thread Hans Novak
Armin Waibel schrieb: i want to change dynamicly the location of the database Server, what is describe in "repository.xml" you can find some suggestion about metadata handling here http://db.apache.org/ojb/docu/guides/metadata.html Hi, first, thanks for your answer. I have try some things

change the defaukt broker

2005-11-29 Thread Hans Novak
Hi, i have succsessful add a second broker with "createPersistenceBroker" and i can use it. But on runtime, i open the class later again and then i cant add it, because the broker alresay exists. And i cant switch to my broker, only to the "default" one. I can also not change my broker to the

repository entries

2005-11-29 Thread Hans Novak
Hi, i want to change dynamicly the location of the database Server, what is describe in "repository.xml" Is it possible, to read the defaults from the "repository.xml" and then, if is neccesery change the value temporary to another location ? I dont want to overwrite the "repository.xml" file.

problems OJB_HL_SEQ

2005-11-22 Thread Hans Novak
Hi, i'm a beginner with ojb. I hade in the past an Debian Sarge with MYSQL Sserver, what is working fine with my java app. Now we had change the server to an ubuntu system.The Java app has not been changegd, but i get errors like shown below. The interesting thing is the"fieldname" and this b