Hi list,
I'm using Castor as the persistence manager with JBoss and ecountered this
following problem.
For example:
I have object say TextEntryPart that extends EntryPart.
In the same Transaction block I use Castor to retrieve the EntryPart object
and then do it again to retrieve the TextEntryPart object. Immediately when
doing the second lookup I got an exception in castor saying that I'm
retrieveing TextEntryPart object but the result returned is EntryPart.
For example for simplicity sake I trim the code a lot:
public void searchEntryPart(int id) {
EntryPart entryPart = castorHelper.findEntry(id)
if (entryPart.getType() == TEXT_ENTRY) {
TextEntryPart textEntry = castorHelper.findEntryPart(id);
}
}
The exception that I got is:
org.exolab.castor.jdo.PersistenceException: Requested to load/fetch an object
of type com.nuix.itopix.dar.TextEntryPart, where persistent storage returned
an object of type class com.nuix.itopix.dar.EntryPart
I've been working through the Castor code, I haven't quiet fully understand
how the querying mechanism work, however from what I understand so far is
that Castor store the object that have been loaded before into the Cache and
try to use that object instead the executing a new SQL query.
Is there any solution in here or do I have a serious design issue?
Regards,
--
Victor Hadianto
---------------
Chinese saying: "He who speak with forked tongue, not need chopsticks."
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev