1. Hibernate Criteria: Return different entity type than rooted entity? stackoverflow.comI have entities similar to:
What I'd like to do is: for each product line, get the latest content (so if theres two content entries ... |
2. Best type for IP-address in Hibernate Entity? stackoverflow.comWhat is the best type for storing IP-addresses in a database using Hibernate? I though Byte[] or String, but is there a better way, or what do you use?
|
3. Hibernate Criteria - how to limit join results to a single entity type? stackoverflow.comOk, so the following query:
can be done with Criteria as follows:
|
4. nhibernate transform an entity from one type to the other: how to handle collections? stackoverflow.comI have a very similar situation to what's described in this question: |
5. JPA different tables, same entity-type coderanch.comI am pretty new to JPA, and I have run into a problem where we have several tables with entities of the same type. Example: Tables: Itemtable2002 Itemtable2003 Itemtable2004 Itemtable2005 Itemtable2006 Itemtableybly (last year) Itemtable (this year) Entity for all is "Item"(same columns for all, but different data). What I need to do, is to allow the user to choose what ... |
7. Configuration Listener for specific entity type forum.hibernate.orgHi everyone, I'm trying to configure my listener by type of an Entity My current configuration : |
8. Changing type of persisted entity? forum.hibernate.orgHoping for a bit of design help here. This is what I have: class File; // info about a file, including its location on disk class ImageFile extends File; // adds info on format, size etc some memory holding the contents of a nameless file. This is what I want to do 1) Construct a File and persist it in order ... |
9. Enumeration Tables, User Types, and Entity Types forum.hibernate.org |
10. Multiple entities with collections of the same entity type forum.hibernate.orgBeginner Joined: Sun Feb 20, 2005 12:14 am Posts: 49 Hibernate Version: 3.0 We have three persistent classes, P1, P2, and Description. P1 and P2 both have a collection of Description entities. This setup works fine if we define our mappings like this: Code: |
11. any types cannot be stringified in DOM4J Entity Model forum.hibernate.orgHibernate version: 3.0.5 Mapping documents: |
12. instance not of expected entity type??? forum.hibernate.orgI have two trees for project objects. One lightweigt and one Full version. When I load the LightweightProjekts tree the exceptions "HibernateException: instance not of expected entity type" occurs when I want update an full ProjektStruktur object. If I don't load the LightweightProjekts tree, I can update an ProjektStruktur object. I load the the first tree with the light projects in ... |
13. new bee changing the type of a entity forum.hibernate.orgI have table called organization this has a column which determines type of organization so we created abstract organization and different implementations based on type . now suppose i want to change the type what's the best way to handle this , right now Organization TypeA TypeB I call findbyId method on organizationService this returns instance of TypeA now I want ... |
14. Change DTYPE to switch Entity types forum.hibernate.orgI am using JPA w/Hibernate. Let's say I have a TrialUser entity and a PayingUser entity. I am using the discriminator column strategy to handle inheritance. When a TrialUser buys a membership, I want to convert them to a PayingUser entity. I've discovered that the best way to do this is to simply change the DTYPE column manually from TrialUser to ... |
15. Nested criterias and entity type forum.hibernate.orgMy model has two class hierarchies: A2 extends A1 A3 extends A2 and B2 extends B1 B3 extends B2 There is a relation from A1 to B1 named "b", Set |
16. Entity with multiple variables of the same embedable type forum.hibernate.orgAfter a bit more research I was able to find a solution. It turns out you can override the column definitions. Doing so seems to make hibernate and the database schema happy. I found the information at http://www.oracle.com/technology/products/ias/toplink/jpa/resources/toplink-jpa-annotations.html#Embedded. In case anyone is curious here's what my class B now looks like as a result. Code: @Entity @Table(name = "table_b") public class ... |