RE: DB Module Problem

"Chris Davis" <[email protected]>
Newsgroups gmane.comp.java.jpublish.devel,gmane.spam.detected
Message-ID <[email protected]>
Anthony,

I believe DBModule is a good start towards easing the creation of DB-backed
apps.

Actually, the reason I came across DBModule, was because I was considering
creating a module myself.  Examining the source for the DBModule began as an
exercise to judge whether I could (or needed to) create a Hibernate (
http://hibernate.sourceforge.net ) module.

Anyway, I've still just begun to look at DBModule, but an early concern for
me is whether or not I can easily make use of DBModule from an Action
script.  Some of the data returned in my app requires additional processing
before display.  If I am limited to using "velocity" commands to processing
the data, DBModule is not very useful to me.

Keep up the good work,
Chris




<quoted>
Chris,

 I have updated the index.xml file in the CVS, thanks.

 The reason for the <multiple> element is to determine whether or not a
 collection or a single object should be exposed in the context.  I could
 just always return a collection, even if there is one element, but I
 thought it would be nice to say something like this (from the edit
 page):

 	<page-action name="db.query">
 		<connection-name>localhost</connection-name>
 		<context-name>contact</context-name>
 		<select>
 			<sql>select * from contact where name = ?</sql>
 			<param index="1" name="name"/>
 		</select>
 	</page-action>

 And have the DBModule automatically place the single result directly in
 the context under the name contact, as opposed to having to extract the
 contact from a collection even if you know you should only have one
 contact.  Am I off-base here?

 Other than the minor bugs what do you think of the concept?  Will this
 make it easier to write simple DB-backed applications?

 Sincerely,
 Anthony Eden
</quoted>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.