Re: Scalar Types

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Feb 02 2005 - 09:33:51 EST

  • Next message: Cris Daniluk: "RE: Scalar Types"

    Hi Joel,

    > I noticed in the mapping tool that there are only choices for object
    > types (ie. Integer, Boolean, String). I didn't see any scalars (ie. int,
    > char, boolean). When I searched the documentation and newsgroup this
    > never seemed to come up. Are scalars supported, and if not, what is the
    > common idiom? Do I write scalar getters and setters in my subclass? I
    > tend to want to map properties that are nullable as objects (ie.
    > Boolean), and those that are not nullable as scalars (ie. boolean).

    Yes, getter and setters is the way to go.

    > Also, can I map a custom type
    > (say "PhoneNum", or "Zip")?

    Yes you can. You need to register an ExtendedType that tells Cayenne how
    to map your custom type to JDBC -
    http://objectstyle.org/cayenne/userguide/access-stack/extended-types.html

    Andrus



    This archive was generated by hypermail 2.0.0 : Wed Feb 02 2005 - 09:33:52 EST