* Copyright (C) 2012 Clarion Media, LLC
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
This annotation indicates if a
is a primary key. If the
annotation is missing from the class hierarchy, Infinitum will look for a
id to use as the primary key. If
Field is found, autoincrement will be enabled for it by
default if it is of type
long. If the primary key is
assigned to a
Field which is not an
autoincrement is enabled, a
will be thrown at runtime. Any
Field marked as a primary key will inherently be marked as
persistent, regardless of any
annotation that might be
associated with it.
The Infinitum ORM currently only supports a single primary key per model,
meaning composite keys will throw a