1. Getting related object's ID without fetching it from the database (Play framework) stackoverflow.comSay I have these two models:
I have a City object and want to ... |
2. how to retrieve ID after object store into database stackoverflow.comI am using Java, spring, jpa for our application. I want to retrieve Id of insert row. Basically our ID is generated at the time of storing object into database.
|
3. fetch of a removed entity by natural id, with caching fails forum.hibernate.orgHi I am using hibernate with EHCache. I have removed a persisted entity using entityManager.remove(persistedEntity). In a later step, i want to add a new entity with the same natural id as the removed one. Before doing that, i am fetching any entity with that natural id to make sure that there is no such entity in the database : Criteria ... |
4. Retrieve id with sql server 2k forum.hibernate.org |
5. Always fetching ID even though lazy is true? forum.hibernate.orgIt's not that big of a deal but still, i've got a small problem: For example: I've got a many-to-one association, which has lazy="no-proxy" mapped. Now when I load this through a session createQuery, i see in the sql log files that the many-to-one his ID is fetched. Why is this? Is it possible to ignore this? I've got a table ... |
6. one-to-one id without fetching forum.hibernate.orgHi: I've got two related classes as shown here: Employee ------> Photograph Every employee has got a photo. It's a one-to-one association set to "Fetch.LAZY", because I don't want the photograph to be retrieved every time I get information about an employee. Sometimes I need an employee's photo id (or null, if none), but I still don't want to retrieve the ... |