Re: Object Metadata

From: Mike Kienenberger (mkienen..laska.net)
Date: Fri Mar 26 2004 - 01:29:28 EST

  • Next message: Steve Wells: "Re: Object Metadata"

    Steve Wells <stwell..wnmail.net> wrote:
    > Does anyone know if its possible to programatically get any info about a
    > data object? In particular I'm after the field length. Using 1.1 M4.
    > I've noticed there is DbAttribute.getMaxLength() method, but can't figure
    > how to get to this from a CayenneDataObject.

    Don't have time to answer this comprehensively, but look at EntityResolver,

    Ie,

            EntityResolver anEntityResolver = aDataContext.getEntityResolver();
            DbEntity aDbEntity = anEntityResolver.lookupDbEntity(aClass);

    This is just one example I had in front of me.



    This archive was generated by hypermail 2.0.0 : Fri Mar 26 2004 - 01:28:56 EST