Hibernate: What inverse means?

If you use Hibernate, you may have seen the “inverse” attribute. I found this simple explanation:

Essentially “inverse” indicates which end of a relationship should be ignored, so when persisting a parent who has a collection of children, should you ask the parent for its list of children, or ask the children who the parents are?

Why does this matter? Well if you are stupid then you might do something like:

Parent parentA = new Parent();
Parent parentB = new Parent();
Child child = new Child();
parentA.getChildren().add(child);
child.setParent(parentB);

how should hibernate persist this situation? For unidirectional one–to–many it is trivial; only one end of the relationship is modelled (there is only parent.addChild(), not child.getParent()), but when it is bidirectional (parent.getChild and child.getParent*) you need to indicate whether the one–to–many is inverse or not.

What does it mean to be inverse? It informs hibernate to ignore that end of the relationship. If the one–to–many was marked as inverse, hibernate would create a child–>parentB relationship (child.getParent). If the one–to–many was marked as non–inverse then a child–>parentA relationship would be created.

From: Hibernates bizarre interpretation of inverse.

* Originally it reads: “child.getChildren”, but Silvia Ruiz get my attention it must reads: “child.getParent”.

More on this here: Inverse attribute of Hibernate.

Free push email for Nokia 5800 XpressMusic

mail2web.com

Your emails, contacts and tasks are fully synchronized with mobile devices such as any PocketPC or Windows® Mobile device, Apple iPhone, BlackBerry, Palm® Treo™ or other Symbian based cell phones. The Exchange Server sends or “pushes” emails, contacts, tasks to the device as soon as they arrive on the Exchange server or you update them. You don’t have to click buttons on your cell phone to check if you have a new item. This means real time wireless synchronization of emails, calendars, tasks and contacts between your cell phone and the Exchange Server.

Sales Professional: Hello, my name is [...], thank you for visiting mail2web support, how may I help you today?
Arturo Tena: Hi [...].
Arturo Tena: I was wondering how could I sign up for a “Basic Email” account.
Arturo Tena: (Not the trial one)
Arturo Tena: It is listed here: http://mail2web.com/mobile-email/pricing.aspx
Sales Professional: You can’t, you just use the trial account and after the 60 days if you don’t input a credit card we automatically move you to the basic email account
Arturo Tena: Oh great!

NuevaSync

What is NuevaSync?
NuevaSync allows direct, over-the-air, native synchronization of certain smart phones and PDA devices with public PIM, and calendaring services including Google Calendar and GMail contacts. NuevaSync does not need any software installed on your device because it uses synchronization protocols that are already built in.

Nokia Messaging

I think this is not free.

Escrito en General. Etiquetas: , . Deja un Comentario »

Pequeño corazón

Pequeño corazón, has de ser fuerte
ante los enbates de la tormenta nocturna.
Jehová está contigo, él nunca te abandonará.