HibernateSupportFlagOutOfSyncErrors

Flag out-of-sync errors

This document outlines the feature that enables Hibernate support in NetBeans IDE to report out-of-sync errors in project files.

Introduction

Hibernate relies on the metadata (either defined in XML or using annotations) to do its job. While, the IDE provides editor support for all Hibernate related artifacts (cfg, mapping, reverse engg. etc. ), there can be cases where the relation between the artifacts and the database schema can go out-of-sync. For example, if there's a mapping file that defines association between a POJO and a db table with four fields, and the POJO is enhanced or updated or removed some of the fields. This breaks the association between mapping file and the corresponding POJO. Similarly, an annotated POJO can go out-of-sync when there's database schema change due to an external change. This feature addresses this issue of Hibernate artifacts going out-of-sync with each other and the database schema.

NOTE : This features reports the out-of-sync errors only and does not intend to provide hints to rectify them where possible (which is a future enhancement)

Features

  1. Configuration editor notifications for database schema and access changes.
  2. Mapping editor notifications for database schema changes, POJO (Java) class changes and dependent mapping changes.
  3. POJO editor (pure Java source editor) notifications for database schema changes and associated mapping changes.

Implementation notes

  1. The out-of-sync process would be a background thread that kicks off when a file is opened for editing. (there's no plan to support for running this process project wide)
  2. The error notification happens using existing editor error notification APIs and Error stripe APIs.
  3. The delay and performance bottlenecks associated with XML model and database round-trip have to be handled effectively.
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo