I don't know the historical decision within mifos per-se; but one thing for
sure is that if one relies strictly on hibernate's automatic DDL, one cannot
reliably (or even easily) upgrade / downgrade schema. So I'd say for any
production usage, using hibernate automatic DDL is a non-starter.

Hibernate's automatic DDL does have some heuristics to try to do
upgrade/downgrade but it's far from perfect. To be fair (to hibernate) , it
is not a problem that is easily solvable without explicit upgrade/downgrade
instruction either.

As one example, hypothetically, if hibernate auomatic DDL generation is
used,

1) as of svn 12345, OfficeBO has a attribute with typo called namme.

2) the typo was discovered later on; the fix is checked in as svn 12350 by
fixing the hbm mapping file.

3) now when the svn 12350 binary is run against a DB with the schema as of
12345. Hibernate automatic DDL can figure out that the DB schema is missing
a column name. However, with that information alone, the automatic DDL has
no reliable way to determine whether it should rename the existing column
(namme), or add a new column.

- sam

On Dec 26, 2007 12:11 AM, Dion Dodgen <[EMAIL PROTECTED]> wrote:

> Hi Adam,
>
> I also wondered about that, not sure on the origins but I would guess
> Mifos started off using JDBC with native sql. Also Hibernate 2 did not
> have much tool support. Not sure?
>
> I have discussed this type of issue before on another project where
> the developers said they wanted full control over the schema modeling,
> normalization etc so did the ddl to domain object thing vs domain to
> schema thing.
>
> Also another consideration is the tie into a specific O/R mapping tool
> (and hibernate generates its own schema - which may not be as
> intuitive as a human relational design) not that these days its that
> relevant with all the reverse engineering options available.
>
> Dion
>
> On Dec 26, 2007 5:28 AM, Adam Monsen <[EMAIL PROTECTED]> wrote:
> > Hibernate can do DDL (create tables, foreign keys, indexes, etc.) for an
> > entire database from .hbm.xml files, right? I suddenly became curious
> > why Mifos uses SQL (sql/latest-schema.sql and others) instead of letting
> > Hibernate do all the DDL.
> >
> > --
> > Adam Monsen
> >
> >
> >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2005.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> >
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Reply via email to