Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dali-dev] Dali + Postgre SQL

Hi,

    I tried to use the "Generate Entities..." menu option to create and
map tables from Postgres using two different JPA implementations (Apache
OpenJpa and Hibernate JPA) and noticed database boolean fields were
mapped to either long (Dali 0.5) or short (Dali 1.0) primitive java data
types.  When I try to use the generated code to load info from the
database, it would fail converting Postgres boolean to either long or
short. Some tests with Postgres driver convincingly showed it correctly
informs the preferred data type to be used in this case is
java.lang.Boolean. A quick - and therefore prone to mistakes - look
through EJB 3.0 spec found nothing sugesting this convertion from
boolean to either long or short to be mandatory.
    Before deciding to post here, I read WTP's FAQ, did lots of
websearching and checked Eclipse Bugzilla for references to similar
problems, nothing of which helped. If I missed something and this post
does not belong here, I apologize and will gladly take RTFM for an
answer, provided someone points me to the FM :). However, I really would
like to use Dali for my next project and having to manually edit
generated files might be rather problematic to us. Can anyone help
please? Is this really a bug or did I miss something?

Thanks in advance,

Guilherme


Back to the top