Category Archives: Uncategorized

DN v5.1 : CDI injected AttributeConverters and event listeners

JPA and JDO API’s introduced the concept of an AttributeConverter which can be used to define how a type is persisted into the datastore, converting from the Java (field) type to a datastore (column) type. All such AttributeConverter classes defined … Continue reading

Posted in Uncategorized | Leave a comment

DataNucleus performance through the releases

Performance isn’t always the primary motivation when we are developing DataNucleus, but it always remains something that we bear in mind when introducing features or rationalising the APIs. As an interesting comparison of how performance has changed since version 3.x … Continue reading

Posted in Uncategorized | 1 Comment

DN v5.1 : Meta Annotations

With normal JDO or JPA usage you may have annotated a class like this @Entity @DatastoreId public class Person { … } So we have a class that is JPA persistable, and is using the DataNucleus “datastore-identity” extension, providing a … Continue reading

Posted in Uncategorized | Leave a comment

DN v5.1 : Find by unique key

With JDO and JPA APIs you have the ability to find individual objects using their “identity”. This “identity” may be a field value for a single field that defines the primary key, or may be an identity object representing a … Continue reading

Posted in Uncategorized | Leave a comment

@Repeatable annotations for JDO and JPA

DataNucleus now provides access to Java8 @Repeatable annotations for use with JDO and JPA. Previously, if you wanted to specify, for example, multiple indexes for a class using annotations, you would have to do it like this (for JDO) using … Continue reading

Posted in Uncategorized | Leave a comment

DN v5 : Multi-tenancy improvements

JDO and JPA APIs don’t define any support for multi-tenancy, other than where you want to have 1 PMF/EMF per tenant and they have their own database or schema. DataNucleus introduced support for multi-tenancy using the same schema back in … Continue reading

Posted in Uncategorized | Leave a comment

DN v5 : Improved support for Enum persistence

With standard JDO and JPA you can persist a Java enum field as either the name (String-based column) or the ordinal (Number-based column). This is great as far as it goes, so we can easily persist fields using this enum. … Continue reading

Posted in Uncategorized | Leave a comment