Re: MS Access Memo Field

2003-11-26 Thread TINO SCHÖLLHORN
Graham Lounder [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Hey all,Hi, as I can see you only have to set the data-type in your repository.xml of the memo-field to LONGVARCHAR. I have had the same problem, but now it is running fine. Tino I'm trying to save a string

RE: SQL Exception

2003-11-26 Thread Mahler Thomas
Hi Michael, The ODMG exceptions do contain the original SQL exceptions to provide user with helpful information. I think you could easily patch the RollbackException to wrap the odm exception. cu, Thomas -Original Message- From: Michael Becke [mailto:[EMAIL PROTECTED] Sent: Tuesday,

Bug in OJB (ODMG) with collections ?

2003-11-26 Thread Philippe Boisaubert
I've got an object which contains a collection. When I change the object collection OJB wants to delete the related object in the database. For example I've got a Book object with a collection of Author object. I've got an n:m non decomposed relationship and my descriptor don't allows

RE: Bug in OJB (ODMG) with collections ?

2003-11-26 Thread oliver . matz
Hello, -Original Message- I've got an object which contains a collection. When I change the object collection OJB wants to delete the related object in the database. this is one of the most frequently asked questions. See any of the threads that contain 'RemovalAwareCollection'.

Problems with Quickstart

2003-11-26 Thread Stephan Wannenwetsch
Hallo, I follow the steps descriped on the Quickstart page, but I get the following error running the command: bin\build junit ERROR: C:\db-ojb-1.0.rc4bin\build junit Buildfile: build.xml splash: set-archive-name: set-archive-name-date: detect-jdk: check-jdk12proxy-classes:

ClassCastException when accessing a collection using lazy-loading mode

2003-11-26 Thread tristan LEPORS
Remarque : message transféré en pièce jointe. ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com---BeginMessage--- Hi, I get sometimes a ClassCastException when I try to get the

HOWTO: Calculate primary key inside the insert stored procedure

2003-11-26 Thread Sergey V. Oudaltsov
Hi all We are trying to insert objects into the table using OJB through some stored procedure (MS SQL 2000) _without_ specifying the primary key (so initially it is null). The key is supposed to be calculated inside the stored procedure. Unfortunately, we get exception assertValidPkFields - it

Re: HOWTO: Calculate primary key inside the insert stored procedure

2003-11-26 Thread Armin Waibel
Hi Sergey, Did you tried to set field as read-only? access = read-only OJB version? regards, Armin Sergey V. Oudaltsov wrote: Hi all We are trying to insert objects into the table using OJB through some stored procedure (MS SQL 2000) _without_ specifying the primary key (so initially it is

PB API: delete then update same object - OptimisticLockException

2003-11-26 Thread oliver . matz
Hello, I have observed the following: when I do the following: broker.beginTransaction(); broker.delete(x); broker.store(x, ObjectModificationDefaultImpl.UPDATE); this fails with a org.apache.ojb.broker.KeyConstraintViolatedException When I use optimistic locking, this fails with an

RE: ClassCastException

2003-11-26 Thread oliver . matz
Hello, -Original Message- this is the exception stack trace : java.lang.ClassCastException: edu.broglie.ws.dto.AppFlulog at edu.broglie.ws.dto.AppAppcli.equals(AppAppcli.java:65) your implementation of equals() does not fulfil the contract specified in the javadoc of that

proxy ClassCastException

2003-11-26 Thread Glauber Andrade
I am trying to use proxy (my first time) and I am getting a ClassCastException. What do I need to do? How do I cast ? Thanks, Glauber Query q = QueryFactory.newQuery(NotaRecibo.class, crit); Collection c = broker.getCollectionByQuery(q);

RE: proxy ClassCastException

2003-11-26 Thread Charles Anthony
You must cast to InterfaceNotaRecibo not NotaRecibo. -Original Message- From: Glauber Andrade [mailto:[EMAIL PROTECTED] Sent: 26 November 2003 15:28 To: [EMAIL PROTECTED] Subject: proxy ClassCastException Importance: High I am trying to use proxy (my first time) and I am

Changing object properties outside the transaction ...

2003-11-26 Thread Philippe Boisaubert
About using/design with ODMG API : Generally I want to get a domain (business) object from the persistence layer. Then I use it in my app (webapp), modify it and when modification are validated, update it in the persistent storage. I use a class for persistence actions (CRUD) like this : class

Re: HOWTO: Calculate primary key inside the insert stored procedure

2003-11-26 Thread Armin Waibel
sorry i mean access = readonly without dash Armin Sergey V. Oudaltsov wrote: Did you tried to set field as read-only? access = read-only Not yet. I will though. Right now. OJB version? Straight from CVS HEAD (well, yesterday) Thanks for the idea,

Re: Identity

2003-11-26 Thread Armin Waibel
Hi, assume you are using SequenceManagerNativeImpl? Please set primarykey=true Which OJB version? regards Armin Rémi Bars wrote: Hi all, i m trying to use identity on sybase with the odmg api. I don t understand why only one object is insert in my table, when i try to add a second object i get

RE: Changing object properties outside the transaction ...

2003-11-26 Thread Guerrero, Axel
I am doing something very similar to what you are trying to do... Here's how I addressed the problem: I have a series of Objects that map to the db tables (I call them data objects). I also have a series of Objects (i call them view objects, almost exact duplicates of the data Objects) that I use

Re: Identity

2003-11-26 Thread Armin Waibel
doh! Seems I'm tired or dumb ;-) I mean autoincrement=true Or did you implement your owm sequence manager? abashed, Armin Armin Waibel wrote: Hi, assume you are using SequenceManagerNativeImpl? Please set primarykey=true Which OJB version? regards Armin Rémi Bars wrote: Hi all, i m trying to

Re: Changing object properties outside the transaction ...

2003-11-26 Thread Philippe Boisaubert
I think about it too. But I must have duplicate object which are the same (or contains only the updatable properties) than persistent ones. Another solution will be to use FormBean (I use Struts) but it forces me to pass a form bean (view data) in my persistent method (persistence layer) as an

date issue

2003-11-26 Thread Sng Wee Jim
Hi, I am using MySQL 4. When a column of type date is mapped to JDBC type TIMESTAMP in the repository.xml ie. field-descriptor id=2 name=dateField column=dateField jdbc-type=TIMESTAMP nullable=false primarykey=true / writing data to the database via OJB will

RE: Changing object properties outside the transaction ...

2003-11-26 Thread Guerrero, Axel
you're correct as far as the duplicate objects goes... if you name your properties the same in both objects, you can use BeanUtils (part of the commons jar) to save yourself the tedious work of a.setXXX(b.getXXX) when copying properties back and forth. I'm also using struts so I have to copy the

Re: prefetch and autoRetreive

2003-11-26 Thread Jakob Braeuchi
hi john, have you tried disabling the collection-desriptor tweaking in RelationshipPrefetcherImpl#prepareRelationshipSettings() ? public void prepareRelationshipSettings() { setCascadeRetrieve(getObjectReferenceDescriptor().getCascadeRetrieve());

how to include extra fields in proxy object

2003-11-26 Thread Michael Mogley
Does Ojb offer a way to include additional propertiesin a proxy object besides the id? I have an Image class with lightweight properties (name and description) and heavyweight properties (various versions of the image data itself). In my webapp, I'd like to pull down a list of ImageProxy

Re: Changing object properties outside the transaction ...

2003-11-26 Thread Philippe Hacquin
Hi, using such view objects is a common J2EE pattern (the value object, or data transfer object). I use it extensively in Struts and OJB applications. It helps decoupling presentation/business logic/persistence tiers in your app, and in the case reported by Philippe, avoid an adherence to the

Re: Changing object properties outside the transaction ...

2003-11-26 Thread Colin Kilburn
Phillippe, I wanted to and do the same thing, and I now use this trick: http://www.mail-archive.com/[EMAIL PROTECTED]/msg04141.html HTH, Colin Philippe Boisaubert wrote: About using/design with ODMG API : Generally I want to get a domain (business) object from the persistence layer. Then I