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
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
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
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
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
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
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
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
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
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
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
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
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
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
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]
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
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
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
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]
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
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
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
: [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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
>
>
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
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
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
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)
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.
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
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]
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
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
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
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
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
--
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
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
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
#
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]
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
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
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
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
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
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
61 matches
Mail list logo