I'm fairly new to This API and I have some questions regarding the
ClassDescriptor.

I'll first describe what I'm trying to achive ( if it's even possible to do
this)

I've setup my repository_user.xml file to do cascade_delete = true for most
objects, but sometimes the user of the application may not want to cascade
delete.  I added a boolean variable to my methods to check if the user wants
to cascade delete or not.  If the user doesn't want to cascade delete, I was
pulling out the ClassDescriptor object from the instance of the broker and
modifying the ObjectReferenceDescriptors and the CollectionDescriptors to
cascade-delete=false.  Now once my operation is complete, I noticed that the
broker kept the modifications.  I tried to get a copy of the original
ClassDescriptor to reset it on the broker before closing it but failed this
attempt.

I'm not really sure at this point how the ClassDescriptor information is
stored in memory. I also tried for fun to create another instance of the
broker inside this method and pull the ClassDescriptor as well to see if it
would be modified when I modified the other one and in deed it is being
modified.  This seems to tell me that all the brokers shared the safe
reference to the ClassDescription object representing the mapping of the xml
file.

I was able to reload the file and get the original version and set it on the
broker once I finished my operation.  But wouldn't this also modify any
other broker in progress and hence not give the user the results he is
looking for in the end.

I would really appreciate any help or information concerning this issue.

Thanks

============================================
  Graham Lounder
  Java Developer
  Spatial Components Division
  CARIS
  264 Rookwood Ave
  Fredericton NB E3B-2M2
  Office 506 462-4263
  Fax    506 459-3849
  [EMAIL PROTECTED]
  http://www.spatialcomponents.com
============================================


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

Reply via email to