Re: [castor-dev] Missing records from OQLQuery

2003-06-10 Thread Martin, Margaret
Steve - Your assumption is correct. I've also turned off caching because there are other points where the db is updated outside of my application. I've not seen any problems at all with it reading the proper data from the db. Are you seeing problems where you get discrepancies between LoanApplicati

Re: [castor-dev] Castor JDO serious design flaw?

2003-02-26 Thread Martin, Margaret
Hiran, You are correct that this can already be accomplished with the current versions of castor. Simply specify the alternate setter/getter methods that you want castor to use in the mapping file - HTH - Margaret -Original Message- From: Hiran Chaudhuri [mailto:[EMAIL PROTECTED] Sent: We

Re: [castor-dev] Problem with relationship

2003-01-16 Thread Martin, Margaret
Fabio - Does the problem only occur with long transactions? What do your mappings look like? More information could be helpful - Margaret -Original Message- From: Fabio Andrés Zorzan [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 16, 2003 11:45 AM To: [EMAIL PROTECTED] Subject: [cast

Re: [castor-dev] Question about saving strings to Oracle as clob

2002-12-26 Thread Martin, Margaret
Xinyu, You will need to use Oracle's oci driver as the clob support is incomplete with the thin driver (I'm guessing that this is likely the cause of the Io Exception). Is your string really 20GB (max size of a clob = 4GB)? Based on the way clobs are implemented in the oracle driver, and the

Re: [castor-dev] Newbie JDO question

2002-12-17 Thread Martin, Margaret
Ross, The xsd is irrelevant to JDO - it just cares about what is in the object and mapping. In this case, as long as the identity field is accessible via getter/setter in the class (which could be defined on a superclass), then JDO will be fine with it. HTH - Margaret -Original Message- F

Re: [castor-dev] Here a an interesting article on castor

2002-12-17 Thread Martin, Margaret
Tim, Are there issues that are unique to putting the mapping files in a war that differ from putting them in a jar and grabbing via a classloader? We deployed ours in the jar with no problems - Margaret -Original Message- From: Tim Holloway [mailto:[EMAIL PROTECTED]] Sent: Tuesday, Decemb

Re: [castor-dev] Remove Objects without loading them?

2002-12-10 Thread Martin, Margaret
Obviously if you have all caching turned off, then you could possibly do some deletes yourself using direct sql calls, but I would only go that route if I had a really clear need for it, not just based on the assumption that it will be slow... if you've got caching turned on, then the call to mater

Re: [castor-dev] castor and jbuilder 7.0

2002-11-27 Thread Martin, Margaret
Richard, I have seen this same behaviour when generating source from within an appserver - it worked from a command prompt and not from within the servlet context. What I've found is that in my case it was a classpath problem - make sure that whatever xml parser is being used in the command line is

Re: [castor-dev] howto update jdo object in combination with xml ?

2002-11-26 Thread Martin, Margaret
Robin, I'm still a little confused about what you are doing - are you saying that the structure of the object that comes in via xml differs from the one that you have persisted in the db, or just that the data is different? If it is just data, is object A complete, or does it just contain a delta o

Re: [castor-dev] 1:N update problem

2002-11-22 Thread Martin, Margaret
Peter, I saw this also, and thought this was a bug (in 0.9.3.9). I fixed it locally by changing the order that the TransactionContext.prepare() processed the updates, moving deletes from being the last thing done to being the first. hth - mm -Original Message- From: Peter Jeszenszky [mail

Re: [castor-dev] query on dependant objects does not work?

2002-11-21 Thread Martin, Margaret
ption come from ParseTreeWalker.checkProjection. Neil -Original Message----- From: Martin, Margaret [mailto:[EMAIL PROTECTED]] Sent: 21 November 2002 17:20 To: [EMAIL PROTECTED] Subject: Re: [castor-dev] query on dependant objects does not work? Neil, I have been successfully doing queries of the form: SELECT j

Re: [castor-dev] query on dependant objects does not work?

2002-11-21 Thread Martin, Margaret
ber 21, 2002 5:56 AM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] query on dependant objects does not work? Margaret, Are you able to query the dependant objects in your model? This would be a work around for me but that does not seem to work either. Neil -Original Message- Fr

Re: [castor-dev] references in collections

2002-11-21 Thread Martin, Margaret
Peter, This sounds similar to a problem we had - in our case we had a FK in the DB to another 1st-class business object that would need to be marshalled. What I did was create a Reference class that knew the type and id of the asset that it referred to so that it could resolve into the referred-to

Re: [castor-dev] How do I define an array collection for JDO?

2002-11-19 Thread Martin, Margaret
Neil, You'll need to add additional setters/getters that utilize either another collection type for the collection (ArrayList or Vector). Then change the mapping to something like: Atoms

Re: [castor-dev] MappingException: The persistence engine interbase is not supported...

2002-11-15 Thread Martin, Margaret
Carlos, What does your database config xml file look like? You'll need to specify that the db type is interbase in order to work with it. HTH - Margaret -Original Message- From: Carlos Miranda [mailto:cev_miranda@;hotmail.com] Sent: Friday, November 15, 2002 4:40 PM To: [EMAIL PROTECTED]

Re: [castor-dev] two class mappings, same table

2002-11-15 Thread Martin, Margaret
Peter, Another solution (possibly no more desirable and oh-so-obvious, but which I would expect would work) would be to simply duplicate the FastVistor mapping information in the Vistor mapping and drop the extends. Best - Margaret -Original Message- From: Peter T. Brown [mailto:peter@;me

Re: [castor-dev] what makes JDO think objects are dirty?

2002-11-13 Thread Martin, Margaret
Thomas, What does your mapping look like? I believe that you have run into the fact that by default caching is turned on. If you want to insure that each retrieval involves a trip to the db (which I would think you would if someone can affect the db outside of your code), then add to the mapping f

Re: [castor-dev] Got Exception "OQLSyntaxException", but why?

2002-11-11 Thread Martin, Margaret
Boris - I think that the is basically saying that Order is a reserved word - try naming it something else and see if that works - Hope this helps - Margaret -Original Message- From: Boris Klug [mailto:boris.klug@;control.de] Sent: Monday, November 11, 2002 5:03 AM To: [EMAIL PROTECTED] Su

Re: [castor-dev] Fw: Concurrency Problem -- Bug in castor???

2002-11-11 Thread Martin, Margaret
Arun, Have you tried making the collection lazy? At least for the case that you are describing, that should prevent the collection in the department from being populated automatically   Hope this helps - Margaret -Original Message-From: Arun Sudhakaran [mailto:[EMAIL PROTECTED]

Re: [castor-dev] XSD and XML Marshalling

2002-10-24 Thread Martin, Margaret
Jason, When you generate your java classes you will end up with one for the elements in your xsd, and each of those will have a corresponding "Descriptor" class generated. These descriptor classes are used for xml serialization by default, so no extra mapping is needed justt for serialization. An a

Re: [castor-dev] Database connection to sql server 2000?

2002-10-16 Thread Martin, Margaret
Patrick, Can you give us some more specifics about what difficulties you saw with the MS Driver? Thanks - Margaret -Original Message- From: Patrick van Kann [mailto:[EMAIL PROTECTED]] Sent: Monday, October 14, 2002 10:20 AM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] Database connect

Re: [castor-dev] unmarshalling of XML not calling setters for Collections...

2002-10-07 Thread Martin, Margaret
RefuX, I did refer to your other email and you seem to have already hit upon the answer - for xml unmarshalling, the add methods are called (I suppose this is because each object is added to the collection as it is encountered, rather than when they are all discovered). I can't speak to why this h

Re: [castor-dev] Flushing the object cache

2002-10-07 Thread Martin, Margaret
: [EMAIL PROTECTED] Subject: Re: [castor-dev] Flushing the object cache At what level would this support flushing ? Flush the whole cache ? Or just specific object instances ? Werner "Martin, Margaret" wrote: > Boris, > Take a look at the cache code that Vince Adamo posted som

Re: [castor-dev] Flushing the object cache

2002-10-07 Thread Martin, Margaret
Boris, Take a look at the cache code that Vince Adamo posted some time back - it should adress this exact problem. As far as I know, the code has not been committed to the archives yet, but it is in use for several implementations, so it is getting a workout - Hope this helps - Margaret -Ori

Re: [castor-dev] one-to-one relationship

2002-10-07 Thread Martin, Margaret
Thomas, I'm pretty sure that all you need to do is treat it just like a 1:m without a collection. I've got several examples that look something like this: Document Text Document Text In my case, B also de

Re: [castor-dev] Long transactions - how to do it (again!)

2002-10-04 Thread Martin, Margaret
Boris, We had exactly the same problem - our solution was to use two connections. One cached, one non-cached. We have the entire object that needs to be persisted, however, and if I remember correctly you said you only have the changes. That could be an issue. Anyway, hope this is helpful - Marg

Re: [castor-dev] map an object to more than one tables

2002-10-02 Thread Martin, Margaret
Antje, If the two have different identities, then the only way to do what you want would be to make a second object (objectB) which maps to the second table, then make that object a dependent of the first (objectA), so that creating/updating/deleting objectA would automatically cause objectB to be

Re: [castor-dev] map an object to more than one tables

2002-10-02 Thread Martin, Margaret
Bruce - But doesn't the inheritance model require that the objects have the same identity? Margaret -Original Message- From: Bruce Snyder [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 12:36 PM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] map an object to more than one t

Re: [castor-dev] Exists clause

2002-09-30 Thread Martin, Margaret
Steve - I've had pretty good success with simple uses of count(*) queries to give me the same result: SELECT count(*) FROM com.MyObject j WHERE parent.id = $1 However, I did see issues where the counts weren't always coming back correctly if the where clause was based on some aspect of a depend

Re: [castor-dev] [Castor JDO] problem using OQL with nested objec ts

2002-07-25 Thread Martin, Margaret
Todd, Thanks for the tip - unfortunately that was a typo in the example I posted, not in the actual code I was running. I was doing the same query for different objects and, like I said, found that in some cases I got the right results and in others did not. Margaret -Original Message

Re: [castor-dev] [Castor JDO] problem using OQL with nested objects

2002-07-24 Thread Martin, Margaret
Kishore, I'm a little hazy on this, but when I was trying to use a query like: Query query=Qdb.getOQLQuery("select a from Obj1 a where a.obj2.name = %1"); query.bind("Schmoe"); query.execute(); I got correct results if obj2 had no dependent objects, but I got incorrect results if it did have depe

Re: [castor-dev] Castor used in the real world?

2002-07-02 Thread Martin, Margaret
Tony, I have similar restrictions in that I've been building a solution for a pre-existing schema that I can't change very much. Views helped enormously. hth - Margaret -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 4:15 PM To: [EMAIL P

Re: [castor-dev] Question: IllegalStateException...Cant Hold ReadLock?

2002-05-31 Thread Martin, Margaret
Kim, I have run into this on several occasions and it is a terribly frustrating bug to track down. If you look closely at the stack trace, the exception is coming from rollback, so the real question for me was "Why am I in a rollback in the first place?". I found that in org.exolab.castor.jdo.SQLE

Re: [castor-dev] MappingException

2002-05-23 Thread Martin, Margaret
Andrew, Your mapping an integer for theCusstomerType to a customerType object, and obviously, Castor is unable to convert from integer to the customer type. I believe that the mapping for theCustomerType should use a sql-many mapping (this is the appropriate mechanism for mapping a 1-1 as well as

Re: [castor-dev] Querying parent depending on child value

2002-05-22 Thread Martin, Margaret
condition, one of the two things happen If it is AND condition, I get zero (0) rows selected. If it is OR condition, I get a union of all conditions.   Hope that helps.   Abhay   -Original Message-From: Martin, Margaret [mailto:[EMAIL PROTECTED

Re: [castor-dev] Problems using castor with ms sql server and i-n et jdbc driver

2002-05-22 Thread Martin, Margaret
Andreas, We have used the inet driver extensively, and have seen plenty of exceptions like the one you posted. In EVERY case, the problem was in our code, not in the driver... and the same code worked fine with oracle. hth - Margaret -Original Message- From: Matthew Baird [mailto:[EMAIL

Re: [castor-dev] Pass Thru SQL throws exception

2002-05-22 Thread Martin, Margaret
Walter, Were you able to get this to work? I am trying to get an example to work where all I want is to select the id of an object, so I've got something like this: "CALL SQL SELECT MYOBJ_ID FROM MYOBJ_TBL AS com.vignette.MyObject" where the primary key for MyObj is myObj_id. I get a null poin

Re: [castor-dev] Querying parent depending on child value

2002-05-17 Thread Martin, Margaret
  Any suggestions ?   Thanks Abhay     -Original Message-From: Martin, Margaret [mailto:[EMAIL PROTECTED]] Sent: Friday, May 17, 2002 11:38 AMTo: [EMAIL PROTECTED]Subject: Re: [castor-dev] Querying parent depending on child value   No, I use oql l

Re: [castor-dev] Collection access / Mapping performance

2002-05-16 Thread Martin, Margaret
ork due to performance reasons. Cheers, Heiko Erhardt skynamics AG www.skynamics.com > -Original Message- > From: Martin, Margaret [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 16, 2002 5:14 PM > To: [EMAIL PROTECTED] > Subject: Re: [castor-dev] Collection access > >

Re: [castor-dev] Collection access

2002-05-16 Thread Martin, Margaret
Heiko - Actually, this is a really nice place to start understanding the castor code base. Take a look at org.exolab.castor.builder.CollectionInfo - especially #createAccessMethods... what I've done is subclass CollectionInfo and extended this method to provide the additional functionality that I

Re: [castor-dev] SourceGenerator using existing Class as type

2002-05-06 Thread Martin, Margaret
Andi - The approach that I have taken is to put the existing classes into a separate schema that is referenced by the one that I want to generate from, then set the namespace mapping to the actual package containing those classes in castorbuilder.properties. For example, the file ExternalTypes.xs

Re: [castor-dev] SQL type 'text'

2002-04-23 Thread Martin, Margaret
Tim, What database are you working with? We're using longs and clobs successfully with oracle (though we did have to fix a bug wrt the longs). The sql type for each of these in the mapping is char (quite counter-intuitively) fo rthe longs, and clob (obviously) for the clobs. The java type for both

Re: [castor-dev] OQL - Projection question - PLEASE HELP!!

2002-04-17 Thread Martin, Margaret
I am trying to do something similar: SELECT a Asset a WHERE a.siteId.id IN LIST( 1,2366) But I'm getting this exception: org.exolab.castor.jdo.oql.OQLSyntaxException: An incorrect token type was found near com (2, need 5 at org.exolab.castor.jdo.oql.Parser.match(Parser.java:144)

Re: [castor-dev] Extension with element not function

2002-04-03 Thread Martin, Margaret
Romilson, I believe you've got some errors in your xml. You might try using a tool like XMLSpy to verify that your xml is well-formed before putting it through the code generator. Try closing the complexContent in the subclass. Also, the type for jj needs to be xs:string.

Re: [castor-dev] HOw to make cache works?

2002-03-19 Thread Martin, Margaret
database -Original Message- From: Martin, Margaret [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 10:04 AM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] HOw to make cache works? This sounds good in theory, but I attempted a query by id, and ended up with the same results as db.load

Re: [castor-dev] HOw to make cache works?

2002-03-19 Thread Martin, Margaret
This sounds good in theory, but I attempted a query by id, and ended up with the same results as db.load()... is this only for a query by some other means than id? -Original Message- From: Low Heng Sin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 2:48 AM To: [EMAIL PROTECTED]

Re: [castor-dev] Object Generation using Schema - Way to implemen t an interface and or specify methods

2002-03-12 Thread Martin, Margaret
Luke, If you need an object to extend a specific superclasses, couldn't you just specify that the object extends the superclass in the schema? Of course, you will have to map the namespaces in castorbuilder.properties, but that seems feasible to me - Hope this helps - Margaret -Original Mess

Re: [castor-dev] Creating object hierarchy

2002-03-08 Thread Martin, Margaret
Davor, In your mapping, you'll need to set up Language with depends=ManufacturerInfo and ManufacturerInfo with depends=Manufacturer. You also need to make the relationships bidirectional - so within the set/add methods for the ManufacturerInfos within Manufacturer, be sure and also set the manufac

Re: [castor-dev] Update and Collections

2002-02-20 Thread Martin, Margaret
Steve, The answer is "it depends" If Services objects are defined in your database mapping as depending on the ServicePackage object (depends="ServicePackage"), then that is exactly what will happen. If not, the two are independent and then you will have to manage the lifecycle of the Services

Re: [castor-dev] How can I make an object bo become transient after I retrieved with an OQL query

2002-02-18 Thread Martin, Margaret
Adrian, Have you trieddoing a read-only query? results = oql.execute(Database.ReadOnly); Hope this helps- Margaret -Original Message- From: Adrian Nistor [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 6:26 PM To: [EMAIL PROTECTED] Subject: [castor-dev] How can I make an obj

Re: [castor-dev] jdoGet/SetTimeStamp

2002-02-15 Thread Martin, Margaret
Ben, Perhaps this is too simplistic for your needs, but for mine I simply have my generated classes extend a class that implements the timestamp methods. I don't have a need to persist the timestamps, so this works for me, unfortunately that may not be the case for you... Good luck - Margaret --

Re: [castor-dev] Collection dirty-checking not occuring (Castor J DO)

2002-02-15 Thread Martin, Margaret
ll not being created :( -Original Message- From: Martin, Margaret [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 4:08 PM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] Collection dirty-checking not occuring (Castor J DO) Kevin, I think that in order to get the behaviour that

Re: [castor-dev] Collection dirty-checking not occuring (Castor JDO)

2002-02-15 Thread Martin, Margaret
Kevin, I think that in order to get the behaviour that you want, you'd need to add depends="User" to your Group mapping. However, then all persistence of groups would have to happen within the context of a User, which might not really be the behavior that you're after. Hope this helps... Margaret

Re: [castor-dev] Subclass for castor xml

2002-02-15 Thread Martin, Margaret
Deepak, I think you have two options for generating subclasses. One is that you create a type available in your xsd for ActionForm and make all of your forms extensions of that type. The other option is to set: # This property allows one to specify the super class of *all* # generated classes #

Re: [castor-dev] Query on dependent object value?

2002-02-14 Thread Martin, Margaret
ct that you have to cast to Product. __ Ing. Gustavo Rafael Pistoia CDA Informática S.A. TE: 4343-5200. Int (6329) 4566. "Martin, Margaret"Para: [EMAIL PROTECTED]

Re: [castor-dev] Does Castor have support for generating XML schema from database DDL?

2002-02-14 Thread Martin, Margaret
Michael, I managed to do this using XMLSpy (www.xmlspy.com). I'm not sure that it is the most elegant xml on the planet, but it is working just fine for me... Hope this helps.. Margaret -Original Message- From: Michael Schulz [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002

[castor-dev] Query on dependent object value?

2002-02-14 Thread Martin, Margaret
Hey all,Is it possible to query for all of the instances of some object where a contained object has a particular value? For instance, in the Product example, I would like to query for all of the Products which have specific value for name I've tried a few things, but I can't even come u

Re: [castor-dev] mapping to arrays of any type

2002-02-12 Thread Martin, Margaret
Remi, The simplest solution is to add get/setBVector methods to A, then reference these as the get-method and set-method in the mapping file. If you are going to be generating a lot of code, you can extend CollectionInfo to automatically do this. Hope this helps... Margaret -Original Message

Re: [castor-dev] xml-castor: how do I put generated source into packages?

2002-02-06 Thread Martin, Margaret
Elisabetta, The option is available on the command line: java org.exolab.castor.builder.SourceGenerator -i MyXmlSchema.xsd -package com.myPackage Hope this helps... Margaret -Original Message- From: Elisabetta Zamorani [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 5:34

Re: [castor-dev] DESCRIPTOR MARSHAL EXCEPTION

2002-01-22 Thread Martin, Margaret
Eswar, I think you will need to regenerate your classes. The source generation creates restrictions in the generated code (all the Descriptor files) to enforce your xsd restrictions. If you update the xsd, then those no longer are valid. Hope this helps... Margaret -Original Message- Fr

Re: [castor-dev] Source Generator

2002-01-07 Thread Martin, Margaret
Oliboni, Take a look at XML Spy (http://www.xmlspy.com/). It will create an xsd from an existing database... cheers - Margaret -Original Message- From: Oliboni Martino [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 12:15 PM To: [EMAIL PROTECTED] Subject: [castor-dev] Source Ge