Re: [OT] SQL in XML file

2004-10-29 Thread Bent André Solheim
TECTED] > Sent: Thursday, October 28, 2004 4:29 AM > To: 'Struts Users Mailing List'; 'Peng Tuck Kwok' > Subject: RE: [OT] SQL in XML file > > Hello, > >I don't think hibernate does sql in a xml file . > >I think it's more of a mappin

RE: [OT] SQL in XML file

2004-10-28 Thread David G. Friedman
- From: Marco Mistroni [mailto:[EMAIL PROTECTED] Sent: Thursday, October 28, 2004 4:29 AM To: 'Struts Users Mailing List'; 'Peng Tuck Kwok' Subject: RE: [OT] SQL in XML file Hello, >I don't think hibernate does sql in a xml file . >I think it's more of a

RE: [OT] SQL in XML file

2004-10-28 Thread Marco Mistroni
Hello, >I don't think hibernate does sql in a xml file . >I think it's more of a mapping of objects. Not in own xml file... but if you have the YourHIbClass.hbm.xml, you can put your sql 'queries' in there.. Of course, that's only for a specific class every class that you use Will need

Re: [OT] SQL in XML file

2004-10-28 Thread Peng Tuck Kwok
I don't think hibernate does sql in a xml file . I think it's more of a mapping of objects. Ashish, you are probably looking for a ORM right ? You could look at hibernate, Cayenne and there's one from apache as well. On Thu, 28 Oct 2004 08:41:15 +0100, Marco Mistroni <[EMAIL PROTECTED]

RE: [OT] SQL in XML file

2004-10-28 Thread Marco Mistroni
Hello Hibernate does something like that, you may want to Have a look at it.. Alternatively, I have done a similar thing for my own webapp, Where I have a 'persistence layer' that reads an xml config File where I list all sql statements and mapping between Columns and DTO fields (I user re

RE: [OT] SQL in XML file

2004-10-27 Thread Ashish Kulkarni
id > > -----Original Message- > From: Ashish Kulkarni > [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 27, 2004 1:58 PM > To: Struts Users Mailing List > Subject: RE: [OT] SQL in XML file > > > Hi > This is what i want to achieve by keeping the SQL > s

RE: [OT] SQL in XML file

2004-10-27 Thread David G. Friedman
I see it as Chapter 3.1 in my Hibernate(.org) v2.1.6 documentation. Regards, David -Original Message- From: Ashish Kulkarni [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 27, 2004 1:58 PM To: Struts Users Mailing List Subject: RE: [OT] SQL in XML file Hi This is what i want to achiev

RE: [OT] SQL in XML file

2004-10-27 Thread Ashish Kulkarni
Hi This is what i want to achieve by keeping the SQL statement outside java code, I can change the SQL statement with out having to compile the java program. The resltset will be returned to another java program So ClassA calls ClassB, ClassB reads my.xml file, which has a SQL statement, ClassB w

Re: [OT] SQL in XML file

2004-10-27 Thread Thompson Marzagao
It's not exacly what you're looking for, as it's meant for testing, but you might want to take a look at DBUnit. At least you can look at the source code: "DbUnit has the ability to export and import your database data to and from XML datasets" http://dbunit.sourceforge.net/ Thompson Ashish Ku

RE: [OT] SQL in XML file

2004-10-27 Thread David G. Friedman
Ashish, Where do you want your resultSet returned? You can use Hibernate(.org) in a webapp or stand-alone (even command line) program. It uses XML configuration files. If you're looking to start the data layer and have it run a prepared statement to put into memory for later use, you could do t

RE: [OT] SQL in XML file

2004-10-27 Thread Robert Taylor
Look at iBatis. robert > -Original Message- > From: Ashish Kulkarni [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 27, 2004 1:02 PM > To: [EMAIL PROTECTED] > Subject: [OT] SQL in XML file > > > Hi > Is there any code out there or any one worked on a > framework, where we can defin