Hi,
I will check out fresh and work from that from now on. I already have a sourceforge account, my username is Holiman.
Thanks,
/Martin
On December 9, 2008 at 12:10 PM Anthony Berglas <anthony <at> berglas.org> wrote:
> Hello Martin,
>
> I have checked in your code. Made minor changes to build, move example to test.
>
> Test task designed to run with simpleorm tests. Compiles, but I cannot get Hsql to persist the db. Tomorrow's problem.
>
> If you do any more work on this you MUST check out and work from that. I do not want to have to merge changes. You should also create an account on Sourceforge for yourself and I can make you a committer, but just to work on the generator at this stage.
>
> Until the test works other issues can wait. But what you have done looks good.
>
> Thanks,
>
> Anthony
>
>
> At 08:20 PM 4/12/2008, you wrote:
> >Hi Anthony,
> >
> >I am not yet member of the list, perhaps you can forward this mail ?
> >
> >I started looking at SimpleORM to manage an existing database, which meant generating code. Unfortunately, the generator code had not been upgraded to 3.0, so I had to start doing that.
> >
> >So, I took a stab at it, and since it now produces compile:able code, it is at least marginally better than it was before (it was defunct). Therefore, it makes sense to publish - but I would not call it 'finished', so it's up to Anthony to decide to check it in or not.
> >
> >These are the changes :
> >
> > * I converted the generate-code into an ant-task (extending Task etc) to run from ant. Anthony requested it to be optional (so it could be built without ant dependency), which is implemented also. I changed the source folders of the generator from
> > * extras/SimpleOrmGenerate/
> > * simpleorm/..
> > * org/...
> > * was moved into extras/SimpleOrmGenerate/src
> > * simpleorm/..
> > * org/...
> > * I added the folder into extras/SimpleOrmGenerate/src-optional
> > * containing SimpleOrmGenerateTask (ant task wrapper)
> > * containing property-file used to define ant task-to-class mapping
> > * To make the ant-bundling optional, I added an Interface to provide property values. By default, system properties are used, but the ant-task can use ant-properties instead.
> > * I added build.xml, which has tasks to create ant-enabled jar, or jar with ant disabled.
> > * I added example.xml, showing how to use it as ant task.
> > * In the generator code, there were some compilation issues with > java 5.0. Fixed those
> > * The generator created code with path-separator (:) instead of file separator (/) - at least that happened on my linux - which does not work well. Fixed that.
> > * The generator generated somewhat obsolete code, referencing SProperty instead of SFieldString and SFieldFlags. Fixed that.
> > * The generator also generated calls to meta.findOrCreate( new Object[] {new Long( _fldId)}); . I have changed that into using a supplied SSessionJdbc connection - I do not know if that makes sense. Since it meant changing the method signature, it will break code based on older versions. Perhaps that should be done in some other fashion?
> > * TODO: Have not found a replacement for SProperty.SFD_GENERATED_KEY, which supposedly is used on for example AUTO_INCREMENT fields. However, it did not trigger on my tables with AUTO_INCREMENT.
> > * TODO: I do not really know if the generated code is optimal, perhaps, with new framework, some other methods should be added and some removed ? If so, please let me know (or do the changes yourself).
> > * TODO: Anthony suggested implementing more rigorous testing framework : generate database from existing test (Employee/Department), then use generator to generate code from that database. I have not implemented that (this was really just a sidetrack on what I was really doing...)
> >
> >I tar:ed the SimpleORMGenerate/ folder into attached file.
> >
> >Regards,
> >Martin Holst Swende
> >
> >
> >--
> >Martin Holst Swende ................. MSC Konsult AB
> >tel: +46(0)70 9519098 ............... Vasagatan 52
> ><
mailto:martin.holst_swende <at> msc.se>martin.holst_swende <at> msc.se .......... 111 20 Stockholm
> >
>
> Dr Anthony Berglas, anthony <at> berglas.org Mobile: +61 4 4838 8874
> Just because it is possible to push twigs along the ground with ones nose
> does not necessarily mean that is the best way to collect firewood.
>
--
Martin Holst Swende ................. MSC Konsult AB
tel: +46(0)70 9519098 ............... Vasagatan 52
martin.holst_swende <at> msc.se .......... 111 20 Stockholm
__._,_.___
__,_._,___