Re: Using ReverseMappingTool.run(...) to generate Java strings?

2013-12-12 Thread Aron L
Rick, That looks great. I like the move from: +if(output == null){ +tool.recordCode(); +} else{ +tool.recordCode(output); +} to +tool.recordCode(output); Many thanks for all the help. I thought you might enjoy this workaround I've bee

Re: Using ReverseMappingTool.run(...) to generate Java strings?

2013-12-12 Thread Rick Curtis
Take a look at https://issues.apache.org/jira/browse/OPENJPA-2466 to see if that'll work for you. Thanks, Rick On Tue, Dec 10, 2013 at 9:37 AM, Aron L wrote: > Rick, > > That does what I need for now, but might I also suggest adding another > method that parallels the one you just suggested: r

Re: Using ReverseMappingTool.run(...) to generate Java strings?

2013-12-10 Thread Aron L
Rick, That does what I need for now, but might I also suggest adding another method that parallels the one you just suggested: run(JDBCConfiguration conf, String[] args, Options opts, Map output)? Or combining the two, say: run(JDBCConfiguration conf, String[] args, Flags flags, Options opts, Map

Re: Using ReverseMappingTool.run(...) to generate Java strings?

2013-12-09 Thread Rick Curtis
I would rather add an additional static run method[1] that has an additional parameter to the existing parameter list and that can be used for output. http://pastebin.com/jZ7vUtM8 Thanks, Rick On Mon, Dec 9, 2013 at 4:29 PM, Aron L wrote: > Rick, > > That could work but I would end up using

Re: Using ReverseMappingTool.run(...) to generate Java strings?

2013-12-09 Thread Aron L
Rick, That could work but I would end up using JDBCConfiguration in an unusual way to get the result I want, something like this: http://pastebin.com/Uqngcuaj I'm not sure if this would be a lasting fix; there's nothing in the method contract that ensures the added value will be propagated throu

Re: Using ReverseMappingTool.run(...) to generate Java strings?

2013-12-09 Thread Rick Curtis
Would something like this work for you? http://pastebin.com/gwrFg48c Thanks, Rick On Mon, Dec 9, 2013 at 10:19 AM, Aron L wrote: > Rick, > > That would be much appreciated - thank you. Please let me know if I can > help > at all. > > -Aron > > > > -- > View this message in context: > http://o

Re: Using ReverseMappingTool.run(...) to generate Java strings?

2013-12-09 Thread Aron L
Rick, That would be much appreciated - thank you. Please let me know if I can help at all. -Aron -- View this message in context: http://openjpa.208410.n2.nabble.com/Using-ReverseMappingTool-run-to-generate-Java-strings-tp7585730p7585742.html Sent from the OpenJPA Users mailing list archive a

Re: Using ReverseMappingTool.run(...) to generate Java strings?

2013-12-09 Thread Rick Curtis
Aron - If you're using trunk I could modify ReverseMappingTool to allow for extension. Let me know if you want me to put something in. Thanks, Rick On Sun, Dec 8, 2013 at 3:50 PM, Aron Lurie wrote: > Rick, > Thanks for the idea. I did some reading into that, and while there is some > potential

Re: Using ReverseMappingTool.run(...) to generate Java strings?

2013-12-08 Thread Aron Lurie
Rick, Thanks for the idea. I did some reading into that, and while there is some potential there to extend ReverseMappingTool and override the recordCode() method, the static run(...) method itself is responsible for instantiating the class [1]. So, without copying all of that method into the subcl

Re: Using ReverseMappingTool.run(...) to generate Java strings?

2013-12-07 Thread Rick Curtis
Have you tried to extend the ReverseMappingTool so that you can intercept the generated code rather than write it to a file? ... I'm not sure how feasible this might be as I'm writing from my phone. On Fri, Dec 6, 2013 at 3:35 PM, Aron L wrote: > Hi All, > > I've managed to get ReverseMappingTo

Using ReverseMappingTool.run(...) to generate Java strings?

2013-12-06 Thread Aron L
Hi All, I've managed to get ReverseMappingTool running from within a plain-old Java method. Using the following: JDBCConfiguration result = new JDBCConfigurationImpl(); result.setDBDictionary(xyz); result.setConnectionURL(xyz); result.set