Hi, 

I tried access="readonly", but Just doing that is not complete.

I did know setting readonly, but I cannot understand the purpose until reading 
some sources. That is not visceral. 

I thought ...
Field have to be able to be read and written in order to use getObjectByQuery.
But, at repository.xml field setting is "readonly".

Now I know just it means "field descriptor is readonly", and getObjectByQuery
dosen't use field descriptor to restore object.

And setting readonly still has problem.
'store, delete, store' modifies ID. 

------------------------------------------------------
// a.getId() == 0;  
broker.store(a);

// a.getId() == some value;
int aId = a.getId()

// check restore value.
a.equals(A.restoreByID(aId));

broker.delete(a);

broker.store(a);
// a.getId() != aId;  some other value, autoincremented one;
-------------------------------------------------------

The cause is readonly access.
When readonly is setted,  Id seems not to be able to send to DB properly.
So, Id must be changed.

This effect make treating foreign key harder.
Maybe my problem's reason is this.

Anyway, I made a patch for SequenceManagerMySQLImpl.
This is not complete. And NativeImpl needs a patch too.

# Unfortunately I cannot read ML at next week.



On Thursday 24 July 2003 19:18, Armin Waibel wrote:
> Hi,
>
> seems ch.mypackage.Person is not declared in the repository
> file, or the sub-file (e.g. repository_user.xml) is not included
> in repository.xml file.
>
> regards,
> Armin
>
> ----- Original Message -----
> From: "Michael Gysi-Gander" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, July 24, 2003 12:01 PM
> Subject: Problem with a ClassNotPersistenceCapableException
>
> > Hi
> >
> > We have a problem when attempting write to the db - what we get is
> >
> > org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
>
> Could not init Identity for given object class ch.mypackage.Person:
> Object has been modified by someone else]
>
> > What is happening here? I get the same error when I attempt to insert
>
> a new "Person" record
>
> > thanks for any help
> > cheers
> > Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
-- shivaken
antshell: Ant command line front end
http://www.antshell.org


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to