Source: http://blog.csdn.net/cityhunter172/article/details/727743
Take the time to speak today. Storage mode in. Net v1.0/v1.1. You can search for in MSDN 2003 to see a description of the node elements in Web.config, a total of off, InProc,
One-to-one foreign key Association in hibernateIn fact, unidirectional 1-1 and N-1 are essentially the same, 1-1 is a special case of N-1, unidirectional 1-1 and N-1 ing configuration is also very similar. You only need to add the unique = "true"
1. Where can I use cascade = "..."?
The cascade attribute is not required for many-to-many relationships. With this attribute, we only make it easier to insert or delete the object, as long as we insert or delete the object at the cascade source,
(1)
Introduction:
Over the past few years, Hibernate has been evolving and has almost become a de facto standard for Java Database persistence. It is very powerful, flexible, and has excellent performance. In this article, we will learn how to use
Hibernate ing (4)-one-to-many
One-to-multiple and multiple-to-one differences:
The ing principle is consistent. A foreign key is added to multiple ends, pointing to one end.
The difference is that the maintained relationship is different:
The
[SSH advanced]-Hibernate multi-to-one ing and one-to-many ing
The previous two articles talk about one-to-one ing. Here we will talk about the ing between many-to-one and one-to-many.
In reality, many scenarios require many-to-one or one-to-many.
4.01. Associate update
The property corresponding to "link tag" is a pojo or a pojo set. Modifying the value of "link attribute" may update the maintable table or the relationtable table.
This type of update is currently called "associated Update ".
In practice, it is best to use org. springframework. transaction. Support. transactiontemplate for operations on programming transactions, because hibernatetemplate is not as expected in actual operations, as shown below:
Objective: To use
Speaking of many-to-many relationships. The most impressive is the elective course of the university. A student can take multiple courses, one course can be taken by multiple students, and each student's chosen course has a grade .The E-r diagram
In general design, multiple-to-multiple Association ing requires an intermediate tableHibernate automatically generates an intermediate tableHibernate uses the tell-to-tell label to represent many-to-many associations.Many-to-many association ING is
Save, update, and delete data:1. Session. save () method:The Session. save () method is used to persistently store object objects. That is to say, when session. save () is executed, an insert SQL statement is generated to save data. The following
Understanding of cascade and inverse in hibernate.
Which hibernate book did you buy? Sun weiqin is proficient in hibernate, or is it just that hibernate...I have bought both of them. In general, it is okay. However, in some cases, it is relatively
This blog will bring you learning about Hibernate's relevance mapping. In real life, not only a one-on mapping relationship, more is a pair of more, many-to-many and so on.One-to-many item association mappingsHere I take the network disk for example,
The main contents of this section:1 introduces the difference between Getcurrentsession and opensession.2 Demo: Compare two sessions by printing to verify that two sessions are the same session3 Demo: Verify that the session is not closed by
1. Create an association
Table Structure Reference nhibernate Review series 01. Use Tblpurchasegroup and Tbluser for many-to-many associations, and the association table is tblpurchasegroupuser.
The Purchasegroup and user class code and the mapping
Hibernate one-way, many-to-many
I recently developed an OA system and used the Hibernate framework. I found that the relationship between permissions and roles is many-to-many. One permission can be assigned to multiple roles, A role has multiple
3. Three statuses of hibernat
Status chart:
Three statuses:
Transient (temporary)
The database does not exist. The session does not exist.
Persistent)
The database also exists in sessions.
Detached)
Session
Java Enterprise Application-Hibernate practical full solution-general Linux technology-Linux programming and kernel information, the following is a detailed description. Bromon originality, please respect copyright
Object Relative ing (ORM) is a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.