 Your new post is loading...
 Your new post is loading...
|
Scooped by
Mickael Ruau
April 18, 2015 5:57 AM
|
La révolution du Big data et des objets connectés crée d’immenses perspectives de création de valeur mais suscite également des interrogations nouvelles sur la protection des droits des individus. Pour renforcer la confiance entre les acteurs et soutenir le développement de modèles économiques innovants, les différentes parties prenantes doivent saisir les opportunités offertes et travailler en confiance.
|
Scooped by
Mickael Ruau
April 18, 2015 1:48 AM
|
This blog shows different approaches of Docker MySQL Persistence - across container restarts and accessible from multiple containers.
|
Scooped by
Mickael Ruau
April 18, 2015 12:49 AM
|
La lutte contre le terrorisme va-t-elle créer deux classes d'états, ceux qui laisseront transiter les données numériques sans contrôle, et les autres?
|
Scooped by
Mickael Ruau
April 15, 2015 4:26 AM
|
XML is a machine as well as human readable markup language which is essentially used to exchange data across various platforms. ATOM, RSS Feeds, REST-SOAP API responses and around hundreds of similar technologies/frameworks use XML as data exchange format. While developing web applications; sometimes we need to create XML documents from MySQL database tables. In this tutorial, I have tried to explain how this can be done for Employee data which is stored in MySQL database table. This is a simple 2 step process as explained below.
|
Scooped by
Mickael Ruau
April 11, 2015 2:04 PM
|
Découvrez les tendances et les caractéristiques de votre marché
Vous répondez à un questionnaire sur votre situation, vos souhaits d'évolution. Un consultant étudie les spécificités de votre marché. Il vous restitue l’analyse lors d’un entretien téléphonique et vous conseille sur la meilleure stratégie à adopter.
|
Scooped by
Mickael Ruau
April 11, 2015 1:20 PM
|
Hibernate ORM Domain model persistence for relational databases
Hibernate Search Full-text search for your domain model
Hibernate Validator Annotation based constraints for your domain model
Hibernate OGM Domain model persistence for NoSQL datastores
Hibernate Tools Command line tools and IDE plugins for your Hibernate usages
Others We like the symmetry, everything else is here
|
Scooped by
Mickael Ruau
April 11, 2015 12:32 PM
|
Here are some Hibernate Annotations related FAQs. Hibernate Annotations FAQ I have migrated to a newer version and something went wrong I can't EAGER more than one collection !? I get an exception when I load more than one collection !? I use @org.hibernate.annotations.Entity and get an Unknown entity exception I have AnnotationException: No identifier specified for entity I'm having NoSuchMethodException(s) How to make the reverse engineering tools create an appropriate annotated composite id? Where can I see the hbm.xml files generated from the Annotations? I have issues with the schema creation with Derby @Serialized was working for me, and now that I use @Lob it fails How can I set inverse="true"? How do I persist my superclass properties? My Annotated class will not load
|
Scooped by
Mickael Ruau
April 11, 2015 12:27 PM
|
Hibernate FAQ - Common Problems
|
Scooped by
Mickael Ruau
April 11, 2015 12:24 PM
|
|
Scooped by
Mickael Ruau
April 11, 2015 12:17 PM
|
DevNexus 2014 Hibernate has always revolved around data, ORM, and JPA. However, it’s much more than that. Hibernate has grown into a family of projects and c…
|
Scooped by
Mickael Ruau
April 11, 2015 12:15 PM
|
Hibernate définit et prend en charge les états d'objets suivants :
Éphémère (transient) - un objet est éphémère s'il a juste été instancié en utilisant l'opérateur new. Il n'a aucune représentation persistante dans la base de données et aucune valeur d'identifiant n'a été assignée. Les instances éphémères seront détruites par le ramasse-miettes si l'application n'en conserve aucune référence. Utilisez la Session d'Hibernate pour rendre un objet persistant (et laisser Hibernate s'occuper des expressions SQL qui ont besoin d'être exécutées pour cette transistion). Persistant - une instance persistante a une représentation dans la base de données et une valeur d'identifiant. Elle pourrait avoir juste été sauvegardée ou chargée, pourtant, elle est par définition dans la portée d'une Session. Hibernate détectera tout changement effectué sur un objet dans l'état persistant et synchronisera l'état avec la base de données lors de la fin de l'unité de travail. Les développeurs n'exécutent pas d'expressions UPDATE ou DELETE manuelles lorsqu'un objet devrait être rendu éphémère. Détaché - une instance détachée est un objet qui a été persistant, mais dont la Session a été fermée. La référence à l'objet est encore valide, bien sûr, et l'instance détachée pourrait même être modifiée dans cet état. Une instance détachée peut être rattachée à une nouvelle Session ultérieurement, la rendant (et toutes les modifications avec) de nouveau persistante. Cette fonctionnalité rend possible un modèle de programmation pour de longues unités de travail qui requièrent un temps de réflexion de l'utilisateur. Nous les appelons des conversations, c'est-à-dire une unité de travail du point de vue de l'utilisateur.
|
Scooped by
Mickael Ruau
April 11, 2015 11:59 AM
|
Enable full-text search capabilities on your Entities To achieve this you have to add a few annotations
|
Scooped by
Mickael Ruau
April 11, 2015 11:38 AM
|
In this tutorial we will write a CRUD application in Hibernate using Java 5 Annotation. For this we will use our previous tutorial Hibernate Maven MySQL hello world example (XML Mapping) as base and convert it from XML Mapping to Annotation.
|
|
Scooped by
Mickael Ruau
April 18, 2015 1:50 AM
|
On a recent engagement I worked with a customer who makes extensive use of UUID() values for their Primary Key and stores it as char(36), and their row count on this example table has grown to over 1 billion rows.
|
Scooped by
Mickael Ruau
April 18, 2015 1:48 AM
|
When optimizing queries and investigating performance issues, MySQL comes with built in support for profiling queries akaSET profiling = 1; . This is already awesome and simple to use, but why the PERFORMANCE_SCHEMA alternative?
|
Scooped by
Mickael Ruau
April 15, 2015 4:27 AM
|
Last week I was implementing a new report using MySQL, and some of the data was stored in JSON format. MySQL has lots of built-in string functions, but none of them work for JSON. My first idea was to use the mysql_json UDF, but then I remembered that common_schema recently added JSON parsing. Since I have common_schema 1.3 installed on all of my databases already, I tried that first.
|
Scooped by
Mickael Ruau
April 15, 2015 4:25 AM
|
JSON (JavaScript Object Notation) is more preferred nowadays over XML as it’s lightweight, readable and easily manageable for exchanging data across various platforms. Most of the social networking application apis like Facebook, twitter, geolocation service providers like google, REST-SOAP API producers and around hundreds of similar technologies/frameworks use JSON as data exchange format. While developing web applications and APIs; we need to create JSON response from MySQL database tables. Creating XML from MySQL was explained in my previous tutorial. In this tutorial, we’ll see how JSON Data can be created from Employee table stored in MySQL database. This is a simple 2 step process as explained below.
|
Scooped by
Mickael Ruau
April 11, 2015 1:56 PM
|
Un mapping objet-relationnel (en anglais object-relational mapping ou ORM) est une technique de programmation informatique qui crée l'illusion d'une base de données orientée objet à partir d'une base de données relationnelle en définissant des correspondances entre cette base de données et les objets du langage utilisé.
|
Scooped by
Mickael Ruau
April 11, 2015 12:33 PM
|
This FAQ covers basic issues you can get when using Hibernate. For more advanced topics, see XXXXX Common problems I get a ClassNotFoundException or NoClassDefFoundError I get a ObjectNotFoundException: No row with the given identifier exists I get InvalidObjectException: Could not find a SessionFactory named: null I get org.hibernate.HibernateException: CGLIB Enhancement failed: ? I saved / deleted / updated an object / collection but I can't see the changes in the database! I saved a parent object but its associated objects weren't saved to the database. I called saveOrUpdate() or update() and got a NonUniqueObjectException! I'm using a one-to-many association with a NOT NULL constraint on the key column and Hibernate causes constraint violations. I'm having trouble with a bidirectional association. Can't I have a bidirectional association using a List or Map? I get a log message: Parsing XML: unknown system id I get a log message: reflection optimizer disabled Hibernate keeps deleting and recreating my collection! Hibernate throws a PropertyAccessException or NullPointerException when I load or query an object! I removed an object from a collection mapped with cascade="all" but the object was not deleted! Hibernate updates an object in the database, when I didn't change anything! How can I get Hibernate to persist an instance variable that does not have property accessors, or simply bypass the property accessors? Hibernate is nontransparent because it requires me to have a default constructor which breaks the API of my class! I'm confused about the semantics of saveOrUpdate(). I don't know if I should use save() or persist(). How does inverse="true" affect the semantics of cascade="all"? I get a ClassCastException when using a composite identifier I get a ClassCastException when I specify a collection sort attribute. I have some other kind of wierd bugs..... Does Hibernate support database views? I'm using Hibernate in a CMT session bean or BMP entity bean and I recieve an exception whenever I try to commit() the Transaction or JDBC Connection. How do I use Hibernate with CMT? How do a write a query that returns objects based upon a WHERE clause condition applied to their collection elements? I want to retrieve query results, one page at a time I see a java.lang.AbstractMethodError: net/sf/hibernate/persister/AbstractEntityPersister.... at startup! I am getting a PropertyAccessException, and the error trace suggests to turn off the reflection optimizer. Howerver, it doesn't seem that I can set this in hibernate.cfg.xml. Hibernate tries to connect to http://hibernate.sourceforge.net at startup! I've enabled the second-level cache and my queries are not being cached! Hibernate returns java.sql.Date instead of java.util.Date! What is the lifecycle of a Hibernate Session? I'm having trouble configuring association fetching strategies...
|
Scooped by
Mickael Ruau
April 11, 2015 12:28 PM
|
Advanced Problems Here are the solutions to some frequent advanced problems.
|
Scooped by
Mickael Ruau
April 11, 2015 12:26 PM
|
Presentation from JEEConf conference (Kiev, May 2012) about issues in Hibernate usage and tricks to avoid them.
|
Scooped by
Mickael Ruau
April 11, 2015 12:23 PM
|
Table of Contents
Preface 1. Tutorial 1.1. Part 1 - The first Hibernate Application 1.1.1. Setup 1.1.2. The first class 1.1.3. The mapping file 1.1.4. Hibernate configuration 1.1.5. Building with Maven 1.1.6. Startup and helpers 1.1.7. Loading and storing objects 1.2. Part 2 - Mapping associations 1.2.1. Mapping the Person class 1.2.2. A unidirectional Set-based association 1.2.3. Working the association 1.2.4. Collection of values 1.2.5. Bi-directional associations 1.2.6. Working bi-directional links 1.3. Part 3 - The EventManager web application 1.3.1. Writing the basic servlet 1.3.2. Processing and rendering 1.3.3. Deploying and testing 1.4. Summary 2. Architecture 2.1. Overview 2.1.1. Minimal architecture 2.1.2. Comprehensive architecture 2.1.3. Basic APIs 2.2. Contextual sessions 3. Configuration 3.1. Programmatic configuration 3.2. Obtaining a SessionFactory 3.3. JDBC connections 3.4. Optional configuration properties 3.4.1. SQL Dialects 3.4.2. Outer Join Fetching 3.4.3. Binary Streams 3.4.4. Second-level and query cache 3.4.5. Query Language Substitution 3.4.6. Hibernate statistics 3.5. Logging 3.6. Implementing a NamingStrategy 3.7. Implementing a PersisterClassProvider 3.8. XML configuration file 3.9. Java EE Application Server integration 3.9.1. Transaction strategy configuration 3.9.2. JNDI-bound SessionFactory 3.9.3. Current Session context management with JTA 4. Persistent Classes 4.1. A simple POJO example 4.1.1. Implement a no-argument constructor 4.1.2. Provide an identifier property 4.1.3. Prefer non-final classes (semi-optional) 4.1.4. Declare accessors and mutators for persistent fields (optional) 4.2. Implementing inheritance 4.3. Implementing equals() and hashCode() 4.4. Dynamic models 4.5. Tuplizers 4.6. EntityNameResolvers 5. Basic O/R Mapping 5.1. Mapping declaration 5.1.1. Entity 5.1.2. Identifiers 5.1.3. Optimistic locking properties (optional) 5.1.4. Property 5.1.5. Embedded objects (aka components) 5.1.6. Inheritance strategy 5.1.7. Mapping one to one and one to many associations 5.1.8. Natural-id 5.1.9. Any 5.1.10. Properties 5.1.11. Some hbm.xml specificities 5.2. Hibernate types 5.2.1. Entities and values 5.2.2. Basic value types 5.2.3. Custom value types 5.3. Mapping a class more than once 5.4. SQL quoted identifiers 5.5. Generated properties 5.6. Column transformers: read and write expressions 5.7. Auxiliary database objects 6. Types 6.1. Value types 6.1.1. Basic value types 6.1.2. Composite types 6.1.3. Collection types 6.2. Entity types 6.3. Significance of type categories 6.4. Custom types 6.4.1. Custom types using org.hibernate.type.Type 6.4.2. Custom types using org.hibernate.usertype.UserType 6.4.3. Custom types using org.hibernate.usertype.CompositeUserType 6.5. Type registry 7. Collection mapping 7.1. Persistent collections 7.2. How to map collections 7.2.1. Collection foreign keys 7.2.2. Indexed collections 7.2.3. Collections of basic types and embeddable objects 7.3. Advanced collection mappings 7.3.1. Sorted collections 7.3.2. Bidirectional associations 7.3.3. Bidirectional associations with indexed collections 7.3.4. Ternary associations 7.3.5. Using an 7.4. Collection examples 8. Association Mappings 8.1. Introduction 8.2. Unidirectional associations 8.2.1. Many-to-one 8.2.2. One-to-one 8.2.3. One-to-many 8.3. Unidirectional associations with join tables 8.3.1. One-to-many 8.3.2. Many-to-one 8.3.3. One-to-one 8.3.4. Many-to-many 8.4. Bidirectional associations 8.4.1. one-to-many / many-to-one 8.4.2. One-to-one 8.5. Bidirectional associations with join tables 8.5.1. one-to-many / many-to-one 8.5.2. one to one 8.5.3. Many-to-many 8.6. More complex association mappings 9. Component Mapping 9.1. Dependent objects 9.2. Collections of dependent objects 9.3. Components as Map indices 9.4. Components as composite identifiers 9.5. Dynamic components 10. Inheritance mapping 10.1. The three strategies 10.1.1. Table per class hierarchy 10.1.2. Table per subclass 10.1.3. Table per subclass: using a discriminator 10.1.4. Mixing table per class hierarchy with table per subclass 10.1.5. Table per concrete class 10.1.6. Table per concrete class using implicit polymorphism 10.1.7. Mixing implicit polymorphism with other inheritance mappings 10.2. Limitations 11. Working with objects 11.1. Hibernate object states 11.2. Making objects persistent 11.3. Loading an object 11.4. Querying 11.4.1. Executing queries 11.4.2. Filtering collections 11.4.3. Criteria queries 11.4.4. Queries in native SQL 11.5. Modifying persistent objects 11.6. Modifying detached objects 11.7. Automatic state detection 11.8. Deleting persistent objects 11.9. Replicating object between two different datastores 11.10. Flushing the Session 11.11. Transitive persistence 11.12. Using metadata 12. Read-only entities 12.1. Making persistent entities read-only 12.1.1. Entities of immutable classes 12.1.2. Loading persistent entities as read-only 12.1.3. Loading read-only entities from an HQL query/criteria 12.1.4. Making a persistent entity read-only 12.2. Read-only affect on property type 12.2.1. Simple properties 12.2.2. Unidirectional associations 12.2.3. Bidirectional associations 13. Transactions and Concurrency 13.1. Session and transaction scopes 13.1.1. Unit of work 13.1.2. Long conversations 13.1.3. Considering object identity 13.1.4. Common issues 13.2. Database transaction demarcation 13.2.1. Non-managed environment 13.2.2. Using JTA 13.2.3. Exception handling 13.2.4. Transaction timeout 13.3. Optimistic concurrency control 13.3.1. Application version checking 13.3.2. Extended session and automatic versioning 13.3.3. Detached objects and automatic versioning 13.3.4. Customizing automatic versioning 13.4. Pessimistic locking 13.5. Connection release modes 14. Interceptors and events 14.1. Interceptors 14.2. Event system 14.3. Hibernate declarative security 15. Batch processing 15.1. Batch inserts 15.2. Batch updates 15.3. The StatelessSession interface 15.4. DML-style operations 16. HQL: The Hibernate Query Language 16.1. Case Sensitivity 16.2. The from clause 16.3. Associations and joins 16.4. Forms of join syntax 16.5. Referring to identifier property 16.6. The select clause 16.7. Aggregate functions 16.8. Polymorphic queries 16.9. The where clause 16.10. Expressions 16.11. The order by clause 16.12. The group by clause 16.13. Subqueries 16.14. HQL examples 16.15. Bulk update and delete 16.16. Tips & Tricks 16.17. Components 16.18. Row value constructor syntax 17. Criteria Queries 17.1. Creating a Criteria instance 17.2. Narrowing the result set 17.3. Ordering the results 17.4. Associations 17.5. Dynamic association fetching 17.6. Components 17.7. Collections 17.8. Example queries 17.9. Projections, aggregation and grouping 17.10. Detached queries and subqueries 17.11. Queries by natural identifier 18. Native SQL 18.1. Using a SQLQuery 18.1.1. Scalar queries 18.1.2. Entity queries 18.1.3. Handling associations and collections 18.1.4. Returning multiple entities 18.1.5. Returning non-managed entities 18.1.6. Handling inheritance 18.1.7. Parameters 18.2. Named SQL queries 18.2.1. Using return-property to explicitly specify column/alias names 18.2.2. Using stored procedures for querying 18.3. Custom SQL for create, update and delete 18.4. Custom SQL for loading 19. Filtering data 19.1. Hibernate filters 20. Improving performance 20.1. Fetching strategies 20.1.1. Working with lazy associations 20.1.2. Tuning fetch strategies 20.1.3. Single-ended association proxies 20.1.4. Initializing collections and proxies 20.1.5. Using batch fetching 20.1.6. Using subselect fetching 20.1.7. Fetch profiles 20.1.8. Using lazy property fetching 20.2. The Second Level Cache 20.2.1. Cache mappings 20.2.2. Strategy: read only 20.2.3. Strategy: read/write 20.2.4. Strategy: nonstrict read/write 20.2.5. Strategy: transactional 20.2.6. Cache-provider/concurrency-strategy compatibility 20.3. Managing the caches 20.4. The Query Cache 20.4.1. Enabling query caching 20.4.2. Query cache regions 20.5. Bytecode Enhancement 20.5.1. Implementing org.hibernate.engine.spi.ManagedEntity interface 20.5.2. Runtime instrument 20.5.3. Build-time instrument 20.6. Understanding Collection performance 20.6.1. Taxonomy 20.6.2. Lists, maps, idbags and sets are the most efficient collections to update 20.6.3. Bags and lists are the most efficient inverse collections 20.6.4. One shot delete 20.7. Monitoring performance 20.7.1. Monitoring a SessionFactory 20.7.2. Metrics 21. Toolset Guide 21.1. Automatic schema generation 21.1.1. Customizing the schema 21.1.2. Running the tool 21.1.3. Properties 21.1.4. Using Ant 21.1.5. Incremental schema updates 21.1.6. Using Ant for incremental schema updates 21.1.7. Schema validation 21.1.8. Using Ant for schema validation 22. Additional modules 22.1. Bean Validation 22.1.1. Adding Bean Validation 22.1.2. Configuration 22.1.3. Catching violations 22.1.4. Database schema 22.2. Hibernate Search 22.2.1. Description 22.2.2. Integration with Hibernate Annotations 23. Example: Parent/Child 23.1. A note about collections 23.2. Bidirectional one-to-many 23.3. Cascading life cycle 23.4. Cascades and unsaved-value 23.5. Conclusion 24. Example: Weblog Application 24.1. Persistent Classes 24.2. Hibernate Mappings 24.3. Hibernate Code 25. Example: Various Mappings 25.1. Employer/Employee 25.2. Author/Work 25.3. Customer/Order/Product 25.4. Miscellaneous example mappings 25.4.1. "Typed" one-to-one association 25.4.2. Composite key example 25.4.3. Many-to-many with shared composite key attribute 25.4.4. Content based discrimination 25.4.5. Associations on alternate keys 26. Best Practices 27. Database Portability Considerations 27.1. Portability Basics 27.2. Dialect 27.3. Dialect resolution 27.4. Identifier generation 27.5. Database functions 27.6. Type mappings References
|
Scooped by
Mickael Ruau
April 11, 2015 12:15 PM
|
|
Scooped by
Mickael Ruau
April 11, 2015 12:04 PM
|
20.34.MySQL 20.34.1. Get a MySQL Connection from the Driver Manager 20.34.2. JDBC Mysql Connection String 20.34.3. MySQL Connection Properties: Passing Additional Properties Using a Database URL 20.34.4. Keep the Connection Alive for MySQL 20.34.5. MySQL Data type to Java Data type Conversion Table 20.34.6. Create a MySQL Table to Store Java Types (Using Statement Objects)? 20.34.7. Retrieve Automatically Generated Keys Using a Statement (MySQL)? 20.34.8. Creating a MySQL Table to Store Java Types 20.34.9. Loading a Flat File to a MySQL Table, file is comma-separated
|
Scooped by
Mickael Ruau
April 11, 2015 11:43 AM
|
Introduction to Hibernate framework and its Architecture. The tutorial shows an overview of different APIs used in Hibernate and its core components like SessionFactory, TransactionFactory, Session, ConnectionProvider etc
|