Re: [castor-dev] Question regarding 'extends' and primary keys

2002-01-30 Thread Alexey A. Efimov
Dave, I think it not implemented feature :) So, with extend are one more corioses: Even if we get to Castor valid tables with id in product and id in computer, the SELECT c.name FROM myapp.Computer WHERE id = "1" Throw Exception somethink about "field can't be reached from Computer". I tried make

Re: [castor-dev] where should castor.properties be located, esp. under tomcat?

2002-01-30 Thread Alexey A. Efimov
remove castor.properties from castor's JAR file -Original Message- From: Stephen Tsun [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 3:28 AM To: [EMAIL PROTECTED] Subject: [castor-dev] where should castor.properties be located, esp. under tomcat? hi: I am a newbie with ca

[castor-dev] jdo with LDAP, ORACLE, POSTGRES, ...

2002-01-30 Thread heyvaert
Is there an example where the same code could be used for inserting, finding, ... data from an sql-database AND an ldap-database AND, ... I thought that castor could handle different kinds of databases with the same code (OQL) that was parsed (with the mapping of the mapping.xml and database.xml

Re: [castor-dev] Mutliple fields primary keys

2002-01-30 Thread Viet Kevin
So a slave object can't have a dependent mapping with a master object whose forein key is part of the primary key of the slave object object slave : (infos, a, x, y) PK is (a, x, y) with (x, y) = FK object master: (attribute1, x, y) PK is (x, y) So I can' t have a castor map

Re: [castor-dev] NullPointer using LazyLoading

2002-01-30 Thread Bruce Snyder
This one time, at band camp, Jeff Bagens said: JB >So there are some more details on my problem below... I continue JB > to struggle with getting lazy loading to work at all. I didn't see JB > any examples on how to do it, so I've been making best guesses. JB > Thanks again for your time and help

Re: [castor-dev] Castor XML --> Marshalling problem (found athre ading issue).

2002-01-30 Thread Keith Visco
Hi Ram, The code for setMapping is as follows: if (_cdResolver == null) _cdResolver = new ClassDescriptorResolverImpl(); _cdResolver.setMappingLoader((XMLMappingLoader)mapping.getResolver(Mapping.XML)); That's all! Perhaps Mapping#getResolver is not thread safe. Upon it's

[castor-dev] Question on types

2002-01-30 Thread Timothy Reaves
O.K., I've read the JDO Types page, and I would like to know if I understand them correctly. I have a table with a field of type BIGINT (in DB2). My mapping for that field bout be: Is this correct? The Java type is long, not Long

Re: [castor-dev] Castor XML --> Marshalling problem (found athre ading issue).

2002-01-30 Thread Ram Chidambaram
Hi Keith, I'm loading the mapping once and caching this Mapping object. I do create a new Marshaller everytime and this Marshaller is not shared accoss threads. The following is the section of code... //get the Mapping object from cache Mapping mapping = getMapp

Re: [castor-dev] where should castor.properties be located, esp. under tomcat?

2002-01-30 Thread Stephen Tsun
Christopher: Cool, it works. Thanks steve -Original Message- From: Christopher Sturm [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 5:21 PM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] where should castor.properties be located, esp. under tomcat? It goes under th

Re: [castor-dev] JDO QueryResults question

2002-01-30 Thread Ping Ding
Hi Ned, I very much appreciate your help and your time. It is still not working after I modify the mapping file. Without many-key in sql, the Jdo only load one orderLine per order and still remove the second orderLine. == Whe

Re: [castor-dev] where should castor.properties be located, esp. under tomcat?

2002-01-30 Thread Christopher Sturm
It goes under the WEB-INF/classes dir of your web app root (NOT under webapps/ROOT/, but something like webapps/MyApp/WEB-INF/classes) I'm not sure but, you may be able to put it in the lib dir under the same WEB-INF dir. I know it works in the classes dir. Chris -Original Message- Fro

[castor-dev] Mapping.xml file for XML Source that has multiple Objects in it.

2002-01-30 Thread Dave Laemmle
We have a main base object that contains numerous member variables that are objects. In one case we have an multiple member variables that are of the same object type. Our data is coming in from an XML file. When I try to set up the mapping file for this. I get an error that it is already defin

Re: [castor-dev] Castor JDO & CALL SQL

2002-01-30 Thread Brad Clow
castor can't cope with brackets in a CALL SQL. we have hacked our castor source to cope with it based on a message about this issue in the archives. brad -Original Message- From: Sylvie RAMON [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 30 January 2002 9:57 PM To: [EMAIL PROTECTED] Subje

[castor-dev] where should castor.properties be located, esp. under tomcat?

2002-01-30 Thread Stephen Tsun
hi: I am a newbie with castor, and it always confuse me how castor finds it castor.properties. I thought I read from the mailing list somewhere that castor finds this file from the classpath. Is that true? If so, if I were to run it under tomcat on solaris, where should I put the castor.prope

Re: [castor-dev] NullPointer using LazyLoading

2002-01-30 Thread Jeff Bagens
So there are some more details on my problem below... I continue to struggle with getting lazy loading to work at all. I didn't see any examples on how to do it, so I've been making best guesses. Thanks again for your time and help!   classes: public class Person extends PersistentItem {    private

Re: [castor-dev] jxDBCon & PostgreSQL & Castor: Using

2002-01-30 Thread Ned Wolpert
--- Jan Kanzleiter <[EMAIL PROTECTED]> wrote: > so, the released castor does not support postgresql-blobs? > or do i misunderstand your posting. I don't mean to say that it doesn't support postgresql-blobs, just that its currently broken, which I'm trying to fix. (At nights, on weekends, etc :-)

Re: [castor-dev] Mapping Help Please

2002-01-30 Thread Adam Sherman
On 01/30/2002 04:01:41 PM -0700, Bruce Snyder wrote: > Please do post those items. Also, see the examples in src/examples/myapp > and src/examples/jdo. The examples will allow you to see real > implementations of objects, client code, DDL, etc. Ah, now I am seeing the light. It is good. (-: Here

Re: [castor-dev] jxDBCon & PostgreSQL & Castor: Using

2002-01-30 Thread Jan Kanzleiter
hi, On Wed, Jan 30, 2002 at 03:14:45PM -0800, Ned Wolpert wrote: > --- Adam Sherman <[EMAIL PROTECTED]> wrote: > You can't really just switch between jdbc drivers since Castor expects > some behavior with the driver in some cases. (Last inserted oid, for > example) However, it may work for the

[castor-dev] java.sql.SQLException: [SQLSVR] Syntax error converting datetime from character string

2002-01-30 Thread Richard Lawson
This one has me stumped. This happens when i commit one of my objects. The object's class has two fields that hold java.util.Date values. I set them like in my code like: // Set the expiry time based on the current time + contract duration. cal.setTime( new Date() );

Re: [castor-dev] Unmarshalling dependent object property is null

2002-01-30 Thread Keith Visco
Castor XML doesn't know anything about Castor JDO dependant objects. I had a bit of trouble following your example with all the foo5/bar5 stuff, but I think you'll need to define the "foreign key" as a reference in the XML binding. And currently it can only be an attribute node...

Re: [castor-dev] Question regarding 'extends' and primary keys

2002-01-30 Thread Dave Ballard
Hello, Anyone have thoughts on this? Feature, bug or user error? Thanks, Dave -Original Message- From: Dave Ballard [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 2:55 PM To: [EMAIL PROTECTED] Subject: [castor-dev] Question regarding 'extends' and primary keys Hello, In t

[castor-dev] Date Conversion Marshallin from XML file

2002-01-30 Thread Dave Laemmle
Any known issues trying to unmarshall dates from an XML file? This same Timestamp works perfectly fine when getting the data from a database? The mappings are essentially the same. Our object uses java.sql.Timestamp for our date fields. Class myclass { ... Timestamp dateEntered;

[castor-dev] Unmarshalling dependent object property is null

2002-01-30 Thread Davis, Richard
Hi, Summary of problem: When I unmarshal a master object and its dependent objects from previously marshalled XML, the dependent objects' properties (Foreign Keys) that are of the parent's data type are not loaded and remain null. Full description: I have an object model where: The Foo5 object

Re: [castor-dev] jxDBCon & PostgreSQL & Castor: Using

2002-01-30 Thread Ned Wolpert
--- Adam Sherman <[EMAIL PROTECTED]> wrote: > The JDBC driver jxDBCon seems to have better Blob support, and is more > JDBC > "compatible". One of our projects will need Blob support, so I want to > use it. Also, it looks like a good project, and I want to support it. The issue with blob-suppor

Re: [castor-dev] jxDBCon & PostgreSQL & Castor: Using

2002-01-30 Thread Adam Sherman
On 01/30/2002 02:17:43 PM -0800, Ned Wolpert wrote: > --- Adam Sherman <[EMAIL PROTECTED]> wrote: >> It seems that the JDBC driver at http://jxdbcon.sourceforge.net/ is a >> good bet for PostgreSQL development. Our project can handle it's >> Alphaness(tm), so I'm very keen. > I'm currently he

Re: [castor-dev] Mapping Help Please

2002-01-30 Thread Bruce Snyder
This one time, at band camp, Adam Sherman said: AS >Here's my model: AS > AS >Client AS >Contact (Person) AS >Contact-Point (Address, Tel, Email, Etc) AS >Intervention (Called, emailed, etc) AS > AS >I'm not sure where to put collection types or how to define the AS >r

Re: [castor-dev] JDO QueryResults question

2002-01-30 Thread Ned Wolpert
Two issues with your mapping file: 1) You have laze="false", it should be lazy="false", or don't include it since that is the default setting. 2) you list the sql many-key in collections. Try this: instead. Does it work? Order definition

Re: [castor-dev] NullPointer using LazyLoading

2002-01-30 Thread Bruce Snyder
This one time, at band camp, Jeff Bagens said: JB > JB > JB > JB > Jeff, It looks like the mapping has changed since you last posted it - only in object name possibly. Could you post the client code that is making use of your object model as well as the two objects involved in

Re: [castor-dev] Mapping Help Please

2002-01-30 Thread Ned Wolpert
The easiest way to learn is take a look at the code in the examples/jdo directory in the castor project. Or, search the mailing archives for 'mapping.xml' as well. Of course, following the examples on the website might be the most accessiable as well. :-) --- Adam Sherman <[EMAIL PROTECTED]> w

Re: [castor-dev] jxDBCon & PostgreSQL & Castor: Using

2002-01-30 Thread Ned Wolpert
--- Adam Sherman <[EMAIL PROTECTED]> wrote: > It seems that the JDBC driver at http://jxdbcon.sourceforge.net/ is a > good bet for PostgreSQL development. Our project can handle it's > Alphaness(tm), so I'm very keen. > > Has anbody done this? Experiences? Should I just try and use the > "post

[castor-dev] Mapping Help Please

2002-01-30 Thread Adam Sherman
Here's my model: Client Contact (Person) Contact-Point (Address, Tel, Email, Etc) Intervention (Called, emailed, etc) I'm not sure where to put collection types or how to define the relationships. I'm going to need both SQL and XML support. If anybody ca

Re: [castor-dev] Adding Database Support: Mckoi SQL

2002-01-30 Thread Bruce Snyder
This one time, at band camp, Adam Sherman said: AS >Browsing them now... Is one of the implementations "cleaner" than the AS >others? Which one should I use as a base? Adam, I'd recommend going with the key generator because the design you described seemed to be similar. Understand how those wo

[castor-dev] jxDBCon & PostgreSQL & Castor: Using

2002-01-30 Thread Adam Sherman
It seems that the JDBC driver at http://jxdbcon.sourceforge.net/ is a good bet for PostgreSQL development. Our project can handle it's Alphaness(tm), so I'm very keen. Has anbody done this? Experiences? Should I just try and use the "postgresql" engine, even though the driver is quite differen

Re: [castor-dev] Strange many to many mapping behaviour

2002-01-30 Thread Steve Earl
Hi Bruce, That was it! Thanks for your help! Steve... -Original Message- From: Bruce Snyder [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 12:58 PM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] Strange many to many mapping behaviour This one time, at band camp, Steve

Re: [castor-dev] Re: how to unmarshal and marshal xsi:schemaLoc ation

2002-01-30 Thread Keith Visco
Hi Kirk, As I mentioned in my earlier post this has been reported before. I decided to take a quick look into it... I coded up an example which uses your code from below...it unmarshals properly for me. It doesn't marshal properly because the namespace is never used, so there are bugs, but at

Re: [castor-dev] Default Class Loader

2002-01-30 Thread Keith Visco
The ClassLoader for the Unmarshaller is chosen as follows: 1. If the user passes in a ClassLoader it's the one used. 2. If the user did not pass in a ClassLoader, then if a mapping is set, the ClassLoader is obtained from the mapping file. 3. If no user ClassLoader and no mapping is set ,

Re: [castor-dev] Strange many to many mapping behaviour

2002-01-30 Thread Bruce Snyder
This one time, at band camp, Steve Earl said: SE >Hi Bruce, SE > SE >The other many to many relationships behave the same way so it must be SE >something in my code. I've attached the objects which are being persisted SE >as well as source for the mbean that controls the CRUD stuff. SE > SE >Tha

Re: [castor-dev] Castor XML --> Marshalling problem.

2002-01-30 Thread Keith Visco
Ram Chidambaram wrote: > > Hi Arnaud, > > Thanks for you reply. I'm using a mapping file which defines the 'bind-xml' > + 'name' to define the name of elements and attributes (also 'map-to'->'xml' > for the root element). > > Does 'castor.properties' apply for this scenario as well? No. cast

[castor-dev] Marshalling without validation

2002-01-30 Thread Emil Breding
Hi, I'm developing a frontend to edit XML documents specified by a Schema. Castor has really made my work a lot easier! My problem is that during the process of editing or creating an XML document it can be in an invalid state. The frontend allows this to the point of saving the document. When t

Re: [castor-dev] oql-problem, EXISTS statement

2002-01-30 Thread Eduard Mossinkoff
Hi I'm having the same problem with the EXISTS statement. Accoring to the documentation the EXISTS statement is supported. My query is well formed according to Castor's modified EBNF OQL notation. Can somebody please tell us a bit more or point us in the right direction. Thanks in advance, Edu