[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about import process from sql-ledger, and Rose::DB



Apologies for the delay, was out of town last week.  Here are my code files: 

  chriscalef.com/files/ledgerSMB/am_import_everything.pl
  chriscalef.com/files/ledgerSMB/lsmb_objects.tar.gz
  chriscalef.com/files/ledgerSMB/DB.pm

* am_import_everything.pl is one huge "import_everything" function that can be dropped into am.pl.   It assumes two registered databases in DB.pm,  with domain="source" for sql-ledger and domain="destination" for ledgerSMB.
* lsmb_objects.tar.gz is all of the Rose object files for ledgerSMB, I store them in a DB directory under LedgerSMB directory.
* DB.pm is a sample Rose setup file for the databases.  The first two are used only when you are doing import_everything, the last one is for normal db usage.

Hope this is helpful.  Bug reports and suggestions happily accepted.

Chris Calef




On Sun, Jun 1, 2008 at 8:40 AM, Ed W <..hidden..> wrote:
I would be very interested to see your import script - please post it

I am working with quite a bit of rails stuff at the moment so I like
object mappings to the database, ROSE looks very nice also.  However, if
you read back there was a long thread about ORMs in LSMB and Chris's
opinion was that he doesn't like them.  I personally think he is missing
the point and that an ORM (home grown or using an off the shelf thing)
saves a LOT of work once setup and can also simplify the code
significantly.  I think the problem is that a lot of off the shelf ORMs
don't handle the case of updates being made via stored procedures very
neatly - I personally believe this can be worked into many ORMs very
neatly, but I don't have the time to do the development so I have to shut up

I think it would be very interesting if you took this further and tried
to add something int SL which used the correct SPs to edit the data
rather than poking the tables directly?

Good luck

Ed W

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ledger-smb-devel mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel