Thanks and raw sql statements and more

From: Peter Karich (peatha..ahoo.de)
Date: Fri Sep 08 2006 - 17:20:38 EDT

  • Next message: Aristedes Maniatis: "Re: Sneak preview of new proposed Cayenne site"

    Hi,

    I have a new version (warning: alpha) of my opensource project gstpl
    (Swing Timetable Platform, see gstpl.sf.net) which uses cayenne and derby.
    Thank you for your project! I like it more than other mappers, because of
    the easy 'reengineer-database' tool and of java class + db schema
    generation! This is easier than hibernate. Okay expect some newbie
    mistakes I made, see 'cayenne INSERTs NULL values instead of strings'
    thread)
    May be you want to 'learn' from gstpl (Things that I learned as a database
    newbie in ONE month!!):
    . How to create the database schema from the appliaction.
    . Using grant/revoke in derby (new 10.2 beta allows that!
    http://wiki.apache.org/db-derby/TenTwoRelease).
    May be you have some comments on doing things better ...

    Andrus, you want to switch from hsqldb to DERBY - I read this in a forum...
    Here are my impressions:
    . derby creates a bigger empty database (1.5MB) instead of some KB.
    . derby is (only for gstpl) as fast as hsqldb.
    . derby has a greater community (okay I know there are sun+ibm behind them
    ...)
    . derby is more secure, offers database encryption and encrypted
    authentication.
    (. Derby does not allow a ';' in my sql statements?)
    . derby passes the ACID test. For more infos:
       http://weblogs.java.net/blog/davidvc/archive/2005/08/database_acidit.html
    Andrus says:
    . derby is saver if you need a good data integrity.

    Now I have several questions related to CAYENNE:

    If I create a new object, can I query the database (e.g. a SelectQuery)
    without a commit? I tried this, but it does not work? Should'nt I get this
    object from the cache instead of the db if it is new?

    How to get the available column headers, not only the headers which I
    defined in the modeler? (I wanted that users of gstpl can change the
    columns of my tables from within gstpl.)
    I tried SelectQuery select = new SelectQuery(tableName);
    QueryMetadata meta = select.getMetaData(getContext().getEntityResolver());
    Iterator iter = meta.getDbEntity().getAttributes().iterator();
    colDefinition = new HashSet();
    while(iter.hasNext())
    colDefinition.add(((DbAttribute)iter.next()).getName());)

    What could happen if I make a raw sql update statement? (Docs says: '...
    and therefore may potentially leave object graph in an inconsistent
    state.') What does this mean for me as programmer?

    Does cayenne support user management in any sense?

    Why or when should I use 'Remote Object Persistenc'? (Sorry for that
    newbie question ...)

    Which license-agreement-files should I add for gstpl? (it only uses the
    cayenne.jar)

    Last but not least: How do you earn money with cayenne?

    Again: Thanks,
    Peter.

                    
    ___________________________________________________________
    Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de



    This archive was generated by hypermail 2.0.0 : Fri Sep 08 2006 - 17:15:15 EDT