Re: sql gen is in

From: Anjo Krank (kran..ogicunited.com)
Date: Mon Jul 31 2006 - 04:23:13 EDT

  • Next message: Guido Neitzer: "Re: sql gen is in"

    Am 31.07.2006 um 09:55 schrieb Guido Neitzer:
    >> I see. So the button "Generate SQL" is totally arbitrary and has
    >> nothing to do with you database?
    >
    > It has - but it has in the aspect of converting my modeled entities
    > into SQL tables - and there has to be some intelligence in doing that.

    Which is just what I'm arguing... it's just that I think the
    intelligence should be in you...

    > I don't think so. EOF knows that an entity will never be
    > instantiated when it is marked as "abstract". If this mark is not
    > set, it has to assume that this entity WILL be instantiated during
    > runtime.

    You may have any odd reason for it not being marked as abstract.
    Maybe it's just a flag that gets reset on loading time? You assume
    far too much knowledge in what other might or might not do with their
    models.

    For example, you might want a CONTENT not null field in your Asset
    entity, which has the name imageData in the Image entity, textData in
    your Document entity and media in your Media entity. IMO, this is
    also totally valid, but with this fix in, it would preclude
    generating the correct SQL. (Which was in fact the reason why the
    original code did not include child entities of single table mappings)

    You may argue that this may be wrong, but my point is that it's no
    more broken than your model and it would now force *me* to work
    around this which I can't do easily while you certainly can.

    > For now, my conclusion is that there is no reason I know of, why a
    > sub-entity may not introduce a required attribute and why EOModeler
    > should not be able to generate the correct SQL.

    Because I don't think that it's a good idea to create fixes for
    things that are not broken in the first place. There are a lot of
    ways to works around this behaviour and neither you nor I have
    knowledge if this fix doesn't break something else for other people.

    Cheers, Anjo



    This archive was generated by hypermail 2.0.0 : Mon Jul 31 2006 - 04:23:19 EDT