[castor-user] [JDO] Using OQL with Date

2005-08-22 Thread Sergio Collantes
Hi all: I've been having trouble when trying to build an OQL query using java.util.Date types. Suppose we have a simple class MyClass with a java.util.Date filed named myDate. The query goes like this: select a from MyClass a where a.mydate expirationDate Let's suppose that the object

Re: [castor-user] How to define mapx,y in castor mapping file?

2005-08-22 Thread Stephen Bash
Avi- I've used a similar mapping many times, and I see two differences between yours and mine: one, I don't define a type in the outermost field element, and two, I have a bind-xml element for the value of the map. These may be minor inconsistencies that don't change anything, but it is all

Re: [castor-user] [JDO] Using OQL with Date

2005-08-22 Thread Ralf Joachim
Hi Sergio, you should be able to execute such a query with: OQLQuery query = db.getOQLQuery( select a from MyClass a where a.mydate $1); query.bind(expirationDate); QueryResults results = query.execute(); Regards Ralf Sergio Collantes schrieb: Hi all: I've been having trouble when

AW: [castor-user] [JDO] Using OQL with Date

2005-08-22 Thread Werner Guttmann
Hi Sergio, how does the problem actually manifest itself ? It is that the query does not return anything ? Or do you get any exceptions ? Werner -Ursprüngliche Nachricht- Von: Sergio Collantes [mailto:[EMAIL PROTECTED] Gesendet: Montag, 22. August 2005 14:26 An:

Re: AW: [castor-user] [JDO] Using OQL with Date

2005-08-22 Thread Sergio Collantes
Sorry, I didn't include that information. Obviusly, what I try to do is to filter the results, getting only those within certain Dates. When I execute the query it return all the rows in the DB, even the ones that are not supposed to be included. When I use the equal operator, the resultset

Re: [castor-user][XML] Looking for advice with mapping file for the map collection type.

2005-08-22 Thread Stephen Bash
Tom- Jitesh Kalyani had a very similar problem about a month ago. You should be able to get to the whole discussion via this link: http://www.mail-archive.com/user@castor.codehaus.org/msg00923.html Basically, because the name field is in the Attribute class and is used as a key in the Map

[castor-user] [XML] Looking for advice with mapping file for the map collection type.

2005-08-22 Thread Kalyani Jitesh
Tom, This is very similar to my case. I have just changed the method name putAttr() to addAttr(), surprisingly its working. ;-) You need not add setAttrs(Map attrs) method. Regards, Jitesh - Original Message - From: Tom Fuda [EMAIL PROTECTED] To: user@castor.codehaus.org Sent:

Re: [castor-user] [XML] AsReference elements as duplicates

2005-08-22 Thread Keith Visco
Steve, It sounds like the generated classes have the JDO friendly getters which return an actual reference to the internal collections instead of a copy. Which would explain why AsReference appears in the getter names of the generated sources. Though I'm not sure why the AsReference methods

Re: [castor-user] xsi:schemaLocation Attribute

2005-08-22 Thread Keith Visco
Jitesh, When you declare the namespace as such: myMarshaller.setNamespaceMapping(, http://www.ne.jp/method/;); You get the below output? If so then it may be a bug, as it shouldn't try and use ns1 in that case. Also, I agree that if the xsi prefix is used anywhere that it should declare the

[castor-user] xsi:schemaLocation Attribute

2005-08-22 Thread Kalyani Jitesh
Hi Keith, Thanks for your reply. #When you declare the namespace as such: myMarshaller.setNamespaceMapping(, http://www.ne.jp/method/;); You get the below output? Yes Keith I am getting below output. In this case I think I will have to instance my XML with namespace prefix OR without