alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Hibernate example source code file (readonly.po)

This example Hibernate source code file (readonly.po) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Hibernate tags/keywords

contract, contract, entities, hibernate, hibernate, hql, if, if, tag, tag, the, to, unidirectional, when

The Hibernate readonly.po source code

# Language zh-CN translations for PACKAGE package.
# Automatically generated, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2010-03-25 06:26+0000\n"
"PO-Revision-Date: 2010-03-25 06:26+0000\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. Tag: title
#: readonly.xml:33
#, no-c-format
msgid "Read-only entities"
msgstr ""

#. Tag: para
#: readonly.xml:36
#, no-c-format
msgid ""
"Hibernate's treatment of <emphasis>read-only entities may differ "
"from what you may have encountered elsewhere. Incorrect usage may cause "
"unexpected results."
msgstr ""

#. Tag: para
#: readonly.xml:43
#, no-c-format
msgid "When an entity is read-only:"
msgstr ""

#. Tag: para
#: readonly.xml:48
#, no-c-format
msgid ""
"Hibernate does not dirty-check the entity's simple properties or single-"
"ended associations;"
msgstr ""

#. Tag: para
#: readonly.xml:54
#, no-c-format
msgid ""
"Hibernate will not update simple properties or updatable single-ended "
"associations;"
msgstr ""

#. Tag: para
#: readonly.xml:60
#, no-c-format
msgid ""
"Hibernate will not update the version of the read-only entity if only simple "
"properties or single-ended updatable associations are changed;"
msgstr ""

#. Tag: para
#: readonly.xml:69
#, no-c-format
msgid ""
"In some ways, Hibernate treats read-only entities the same as entities that "
"are not read-only:"
msgstr ""

#. Tag: para
#: readonly.xml:75
#, no-c-format
msgid ""
"Hibernate cascades operations to associations as defined in the entity "
"mapping."
msgstr ""

#. Tag: para
#: readonly.xml:81
#, no-c-format
msgid ""
"Hibernate updates the version if the entity has a collection with changes "
"that dirties the entity;"
msgstr ""

#. Tag: para
#: readonly.xml:87
#, no-c-format
msgid "A read-only entity can be deleted."
msgstr ""

#. Tag: para
#: readonly.xml:94
#, no-c-format
msgid ""
"Even if an entity is not read-only, its collection association can be "
"affected if it contains a read-only entity."
msgstr ""

#. Tag: para
#: readonly.xml:99
#, no-c-format
msgid ""
"For details about the affect of read-only entities on different property and "
"association types, see <xref linkend=\"readonly-proptypes\"/>."
msgstr ""

#. Tag: para
#: readonly.xml:105
#, no-c-format
msgid "For details about how to make entities read-only, see"
msgstr ""

#. Tag: para
#: readonly.xml:110
#, no-c-format
msgid "Hibernate does some optimizing for read-only entities:"
msgstr ""

#. Tag: para
#: readonly.xml:115
#, no-c-format
msgid ""
"It saves execution time by not dirty-checking simple properties or single-"
"ended associations."
msgstr ""

#. Tag: para
#: readonly.xml:121
#, no-c-format
msgid "It saves memory by deleting database snapshots."
msgstr ""

#. Tag: title
#: readonly.xml:128
#, no-c-format
msgid "Making persistent entities read-only"
msgstr ""

#. Tag: para
#: readonly.xml:130
#, no-c-format
msgid ""
"Only persistent entities can be made read-only. Transient and detached "
"entities must be put in persistent state before they can be made read-only."
msgstr ""

#. Tag: para
#: readonly.xml:136
#, no-c-format
msgid ""
"Hibernate provides the following ways to make persistent entities read-only:"
msgstr ""

#. Tag: para
#: readonly.xml:142
#, no-c-format
msgid ""
"you can map an entity class as <emphasis>immutable; when an "
"entity of an immutable class is made persistent, Hibernate automatically "
"makes it read-only. see <xref linkend=\"readonly-api-immutable\"/> for "
"details"
msgstr ""

#. Tag: para
#: readonly.xml:150
#, no-c-format
msgid ""
"you can change a default so that entities loaded into the session by "
"Hibernate are automatically made read-only; see <xref linkend=\"readonly-api-"
"loaddefault\"/> for details"
msgstr ""

#. Tag: para
#: readonly.xml:157
#, no-c-format
msgid ""
"you can make an HQL query or criteria read-only so that entities loaded when "
"the query or criteria executes, scrolls, or iterates, are automatically made "
"read-only; see <xref linkend=\"readonly-api-querycriteria\"/> for details"
msgstr ""

#. Tag: para
#: readonly.xml:165
#, no-c-format
msgid ""
"you can make a persistent entity that is already in the in the session read-"
"only; see <xref linkend=\"readonly-api-entity\"/> for details"
msgstr ""

#. Tag: title
#: readonly.xml:174
#, no-c-format
msgid "Entities of immutable classes"
msgstr ""

#. Tag: para
#: readonly.xml:176
#, no-c-format
msgid ""
"When an entity instance of an immutable class is made persistent, Hibernate "
"automatically makes it read-only."
msgstr ""

#. Tag: para
#: readonly.xml:180
#, no-c-format
msgid ""
"An entity of an immutable class can created and deleted the same as an "
"entity of a mutable class."
msgstr ""

#. Tag: para
#: readonly.xml:185
#, no-c-format
msgid ""
"Hibernate treats a persistent entity of an immutable class the same way as a "
"read-only persistent entity of a mutable class. The only exception is that "
"Hibernate will not allow an entity of an immutable class to be changed so it "
"is not read-only."
msgstr ""

#. Tag: title
#: readonly.xml:196
#, no-c-format
msgid "Loading persistent entities as read-only"
msgstr ""

#. Tag: para
#: readonly.xml:199 readonly.xml:286
#, no-c-format
msgid "Entities of immutable classes are automatically loaded as read-only."
msgstr ""

#. Tag: para
#: readonly.xml:205
#, no-c-format
msgid ""
"To change the default behavior so Hibernate loads entity instances of "
"mutable classes into the session and automatically makes them read-only, "
"call:"
msgstr ""

#. Tag: programlisting
#: readonly.xml:210
#, no-c-format
msgid "Session.setDefaultReadOnly( true );"
msgstr ""

#. Tag: para
#: readonly.xml:212
#, no-c-format
msgid ""
"To change the default back so entities loaded by Hibernate are not made read-"
"only, call:"
msgstr ""

#. Tag: programlisting
#: readonly.xml:216
#, no-c-format
msgid "Session.setDefaultReadOnly( false );"
msgstr ""

#. Tag: para
#: readonly.xml:218
#, no-c-format
msgid "You can determine the current setting by calling:"
msgstr ""

#. Tag: programlisting
#: readonly.xml:221
#, no-c-format
msgid "Session.isDefaultReadOnly();"
msgstr ""

#. Tag: para
#: readonly.xml:223
#, no-c-format
msgid ""
"If Session.isDefaultReadOnly() returns true, entities loaded by the "
"following are automatically made read-only:"
msgstr ""

#. Tag: para
#: readonly.xml:229
#, no-c-format
msgid "Session.load()"
msgstr ""

#. Tag: para
#: readonly.xml:234
#, no-c-format
msgid "Session.get()"
msgstr ""

#. Tag: para
#: readonly.xml:239
#, no-c-format
msgid "Session.merge()"
msgstr ""

#. Tag: para
#: readonly.xml:244
#, no-c-format
msgid ""
"executing, scrolling, or iterating HQL queries and criteria; to override "
"this setting for a particular HQL query or criteria see"
msgstr ""

#. Tag: para
#: readonly.xml:253
#, no-c-format
msgid "Changing this default has no effect on:"
msgstr ""

#. Tag: para
#: readonly.xml:258
#, no-c-format
msgid "persistent entities already in the session when the default was changed"
msgstr ""

#. Tag: para
#: readonly.xml:264
#, no-c-format
msgid ""
"persistent entities that are refreshed via Session.refresh(); a refreshed "
"persistent entity will only be read-only if it was read-only before "
"refreshing"
msgstr ""

#. Tag: para
#: readonly.xml:272
#, no-c-format
msgid ""
"persistent entities added by the application via Session.persist(), Session."
"save(), and Session.update() Session.saveOrUpdate()"
msgstr ""

#. Tag: title
#: readonly.xml:283
#, no-c-format
msgid "Loading read-only entities from an HQL query/criteria"
msgstr ""

#. Tag: para
#: readonly.xml:292
#, no-c-format
msgid ""
"If Session.isDefaultReadOnly() returns false (the default) when an HQL query "
"or criteria executes, then entities and proxies of mutable classes loaded by "
"the query will not be read-only."
msgstr ""

#. Tag: para
#: readonly.xml:299
#, no-c-format
msgid ""
"You can override this behavior so that entities and proxies loaded by an HQL "
"query or criteria are automatically made read-only."
msgstr ""

#. Tag: para
#: readonly.xml:304
#, no-c-format
msgid "For an HQL query, call:"
msgstr ""

#. Tag: programlisting
#: readonly.xml:307
#, no-c-format
msgid "Query.setReadOnly( true );"
msgstr ""

#. Tag: para
#: readonly.xml:309
#, no-c-format
msgid ""
"<literal>Query.setReadOnly( true ) must be called before "
"<literal>Query.list(), Query.uniqueResult(), "
"<literal>Query.scroll(), or Query.iterate()"
msgstr ""

#. Tag: para
#: readonly.xml:315
#, no-c-format
msgid "For an HQL criteria, call:"
msgstr ""

#. Tag: programlisting
#: readonly.xml:318
#, no-c-format
msgid "Criteria.setReadOnly( true );"
msgstr ""

#. Tag: para
#: readonly.xml:320
#, no-c-format
msgid ""
"<literal>Criteria.setReadOnly( true ) must be called before "
"<literal>Criteria.list(), Criteria.uniqueResult()Criteria.scroll()"
msgstr ""

#. Tag: para
#: readonly.xml:326
#, no-c-format
msgid ""
"Entities and proxies that exist in the session before being returned by an "
"HQL query or criteria are not affected."
msgstr ""

#. Tag: para
#: readonly.xml:331
#, no-c-format
msgid ""
"Uninitialized persistent collections returned by the query are not affected. "
"Later, when the collection is initialized, entities loaded into the session "
"will be read-only if Session.isDefaultReadOnly() returns true."
msgstr ""

#. Tag: para
#: readonly.xml:338
#, no-c-format
msgid ""
"Using <literal>Query.setReadOnly( true ) or Criteria."
"setReadOnly( true )</literal> works well when a single HQL query or criteria "
"loads all the entities and intializes all the proxies and collections that "
"the application needs to be read-only."
msgstr ""

#. Tag: para
#: readonly.xml:346
#, no-c-format
msgid ""
"When it is not possible to load and initialize all necessary entities in a "
"single query or criteria, you can temporarily change the session default to "
"load entities as read-only before the query is executed. Then you can "
"explicitly initialize proxies and collections before restoring the session "
"default."
msgstr ""

#. Tag: programlisting
#: readonly.xml:355
#, no-c-format
msgid ""
"Session session = factory.openSession();\n"
"Transaction tx = session.beginTransaction();\n"
" \n"
"setDefaultReadOnly( true );\n"
"Contract contract = \n"
"   ( Contract ) session.createQuery(\n"
"           \"from Contract where customerName = 'Sherman'\" )\n"
"           .uniqueResult();\n"
"Hibernate.initialize( contract.getPlan() );\n"
"Hibernate.initialize( contract.getVariations() );\n"
"Hibernate.initialize( contract.getNotes() );\n"
"setDefaultReadOnly( false );\n"
"...\n"
"tx.commit();\n"
"session.close();"
msgstr ""

#. Tag: para
#: readonly.xml:357
#, no-c-format
msgid ""
"If Session.isDefaultReadOnly() returns true, then you can use Query."
"setReadOnly( false ) and Criteria.setReadOnly( false ) to override this "
"session setting and load entities that are not read-only."
msgstr ""

#. Tag: title
#: readonly.xml:367
#, no-c-format
msgid "Making a persistent entity read-only"
msgstr ""

#. Tag: para
#: readonly.xml:369
#, no-c-format
msgid ""
"Persistent entities of immutable classes are automatically made read-only."
msgstr ""

#. Tag: para
#: readonly.xml:375
#, no-c-format
msgid "To make a persistent entity or proxy read-only, call:"
msgstr ""

#. Tag: programlisting
#: readonly.xml:378
#, no-c-format
msgid "Session.setReadOnly(entityOrProxy, true)"
msgstr ""

#. Tag: para
#: readonly.xml:380
#, no-c-format
msgid ""
"To change a read-only entity or proxy of a mutable class so it is no longer "
"read-only, call:"
msgstr ""

#. Tag: programlisting
#: readonly.xml:384
#, no-c-format
msgid "Session.setReadOnly(entityOrProxy, false)"
msgstr ""

#. Tag: para
#: readonly.xml:387
#, no-c-format
msgid ""
"When a read-only entity or proxy is changed so it is no longer read-only, "
"Hibernate assumes that the current state of the read-only entity is "
"consistent with its database representation. If this is not true, then any "
"non-flushed changes made before or while the entity was read-only, will be "
"ignored."
msgstr ""

#. Tag: para
#: readonly.xml:396
#, no-c-format
msgid ""
"To throw away non-flushed changes and make the persistent entity consistent "
"with its database representation, call:"
msgstr ""

#. Tag: programlisting
#: readonly.xml:400
#, no-c-format
msgid "session.refresh( entity );"
msgstr ""

#. Tag: para
#: readonly.xml:402
#, no-c-format
msgid ""
"To flush changes made before or while the entity was read-only and make the "
"database representation consistent with the current state of the persistent "
"entity:"
msgstr ""

#. Tag: programlisting
#: readonly.xml:408
#, no-c-format
msgid ""
"// evict the read-only entity so it is detached\n"
"session.evict( entity );\n"
"\n"
"// make the detached entity (with the non-flushed changes) persistent\n"
"session.update( entity );\n"
"\n"
"// now entity is no longer read-only and its changes can be flushed\n"
"s.flush();"
msgstr ""

#. Tag: title
#: readonly.xml:413
#, no-c-format
msgid "Read-only affect on property type"
msgstr ""

#. Tag: para
#: readonly.xml:415
#, no-c-format
msgid ""
"The following table summarizes how different property types are affected by "
"making an entity read-only."
msgstr ""

#. Tag: title
#: readonly.xml:421
#, no-c-format
msgid "Affect of read-only entity on property types"
msgstr ""

#. Tag: entry
#: readonly.xml:427
#, no-c-format
msgid "Property/Association Type"
msgstr ""

#. Tag: entry
#: readonly.xml:428
#, no-c-format
msgid "Changes flushed to DB?"
msgstr ""

#. Tag: entry
#: readonly.xml:433
#, no-c-format
msgid "Simple"
msgstr ""

#. Tag: para
#: readonly.xml:435
#, no-c-format
msgid "(<xref linkend=\"readonly-proptypes-simple\"/>)"
msgstr ""

#. Tag: entry
#: readonly.xml:439
#, no-c-format
msgid "<entry>no*"
msgstr ""

#. Tag: para
#: readonly.xml:443
#, no-c-format
msgid "Unidirectional one-to-one"
msgstr ""

#. Tag: para
#: readonly.xml:444
#, no-c-format
msgid "Unidirectional many-to-one"
msgstr ""

#. Tag: para
#: readonly.xml:445
#, no-c-format
msgid "(<xref linkend=\"readonly-proptypes-singleended-unidir\"/>)"
msgstr ""

#. Tag: para
#: readonly.xml:451 readonly.xml:452
#, no-c-format
msgid "<para>no*"
msgstr ""

#. Tag: para
#: readonly.xml:457
#, no-c-format
msgid "Unidirectional one-to-many"
msgstr ""

#. Tag: para
#: readonly.xml:458
#, no-c-format
msgid "Unidirectional many-to-many"
msgstr ""

#. Tag: para
#: readonly.xml:459
#, no-c-format
msgid "(<xref linkend=\"readonly-proptypes-manyended-unidir\"/>)"
msgstr ""

#. Tag: para
#: readonly.xml:464 readonly.xml:465 readonly.xml:489
#, no-c-format
msgid "<para>yes"
msgstr ""

#. Tag: para
#: readonly.xml:470
#, no-c-format
msgid "<para>Bidirectional one-to-one"
msgstr ""

#. Tag: para
#: readonly.xml:471
#, no-c-format
msgid "(<xref linkend=\"readonly-proptypes-onetoone-bidir\"/>)"
msgstr ""

#. Tag: entry
#: readonly.xml:475
#, no-c-format
msgid "only if the owning entity is not read-only*"
msgstr ""

#. Tag: para
#: readonly.xml:479
#, no-c-format
msgid "<para>Bidirectional one-to-many/many-to-one"
msgstr ""

#. Tag: para
#: readonly.xml:480
#, no-c-format
msgid "inverse collection"
msgstr ""

#. Tag: para
#: readonly.xml:481
#, no-c-format
msgid "non-inverse collection"
msgstr ""

#. Tag: para
#: readonly.xml:482
#, no-c-format
msgid "(<xref linkend=\"readonly-proptypes-onetomany-manytoone\"/>)"
msgstr ""

#. Tag: para
#: readonly.xml:488
#, no-c-format
msgid "only added/removed entities that are not read-only*"
msgstr ""

#. Tag: para
#: readonly.xml:494
#, no-c-format
msgid "<para>Bidirectional many-to-many"
msgstr ""

#. Tag: para
#: readonly.xml:495
#, no-c-format
msgid "(<xref linkend=\"readonly-proptypes-manytomany-bidir\"/>)"
msgstr ""

#. Tag: entry
#: readonly.xml:499
#, no-c-format
msgid "<entry>yes"
msgstr ""

#. Tag: para
#: readonly.xml:505
#, no-c-format
msgid ""
"* Behavior is different when the entity having the property/association is "
"read-only, compared to when it is not read-only."
msgstr ""

#. Tag: title
#: readonly.xml:511
#, no-c-format
msgid "Simple properties"
msgstr ""

#. Tag: para
#: readonly.xml:513
#, no-c-format
msgid ""
"When a persistent object is read-only, Hibernate does not dirty-check simple "
"properties."
msgstr ""

#. Tag: para
#: readonly.xml:518
#, no-c-format
msgid ""
"Hibernate will not synchronize simple property state changes to the "
"database. If you have automatic versioning, Hibernate will not increment the "
"version if any simple properties change."
msgstr ""

#. Tag: programlisting
#: readonly.xml:524
#, no-c-format
msgid ""
"Session session = factory.openSession();\n"
"Transaction tx = session.beginTransaction();\n"
"\n"
"// get a contract and make it read-only\n"
"Contract contract = ( Contract ) session.get( Contract.class, contractId );\n"
"session.setReadOnly( contract, true );\n"
"\n"
"// contract.getCustomerName() is \"Sherman\"\n"
"contract.setCustomerName( \"Yogi\" );\n"
"tx.commit();\n"
"\n"
"tx = session.beginTransaction();\n"
"\n"
"contract = ( Contract ) session.get( Contract.class, contractId );\n"
"// contract.getCustomerName() is still \"Sherman\"\n"
"...\n"
"tx.commit();\n"
"session.close();"
msgstr ""

#. Tag: title
#: readonly.xml:529
#, no-c-format
msgid "Unidirectional associations"
msgstr ""

#. Tag: title
#: readonly.xml:532
#, no-c-format
msgid "Unidirectional one-to-one and many-to-one"
msgstr ""

#. Tag: para
#: readonly.xml:534
#, no-c-format
msgid ""
"Hibernate treats unidirectional one-to-one and many-to-one associations in "
"the same way when the owning entity is read-only."
msgstr ""

#. Tag: para
#: readonly.xml:540
#, no-c-format
msgid ""
"We use the term <emphasis>unidirectional single-ended association "
"when referring to functionality that is common to unidirectional one-to-one "
"and many-to-one associations."
msgstr ""

#. Tag: para
#: readonly.xml:547
#, no-c-format
msgid ""
"Hibernate does not dirty-check unidirectional single-ended associations when "
"the owning entity is read-only."
msgstr ""

#. Tag: para
#: readonly.xml:552
#, no-c-format
msgid ""
"If you change a read-only entity's reference to a unidirectional single-"
"ended association to null, or to refer to a different entity, that change "
"will not be flushed to the database."
msgstr ""

#. Tag: para
#: readonly.xml:560
#, no-c-format
msgid ""
"If an entity is of an immutable class, then its references to unidirectional "
"single-ended associations must be assigned when that entity is first "
"created. Because the entity is automatically made read-only, these "
"references can not be updated."
msgstr ""

#. Tag: para
#: readonly.xml:570
#, no-c-format
msgid ""
"If automatic versioning is used, Hibernate will not increment the version "
"due to local changes to unidirectional single-ended associations."
msgstr ""

#. Tag: para
#: readonly.xml:576
#, no-c-format
msgid ""
"In the following examples, Contract has a unidirectional many-to-one "
"association with Plan. Contract cascades save and update operations to the "
"association."
msgstr ""

#. Tag: para
#: readonly.xml:582
#, no-c-format
msgid ""
"The following shows that changing a read-only entity's many-to-one "
"association reference to null has no effect on the entity's database "
"representation."
msgstr ""

#. Tag: programlisting
#: readonly.xml:588
#, no-c-format
msgid ""
"// get a contract with an existing plan;\n"
"// make the contract read-only and set its plan to null \n"
"tx = session.beginTransaction();\n"
"Contract contract = ( Contract ) session.get( Contract.class, contractId );\n"
"session.setReadOnly( contract, true );\n"
"contract.setPlan( null );\n"
"tx.commit();\n"
"\n"
"// get the same contract\n"
"tx = session.beginTransaction();\n"
"contract = ( Contract ) session.get( Contract.class, contractId );\n"
"\n"
"// contract.getPlan() still refers to the original plan;\n"
"\n"
"tx.commit();\n"
"session.close();"
msgstr ""

#. Tag: para
#: readonly.xml:590
#, no-c-format
msgid ""
"The following shows that, even though an update to a read-only entity's many-"
"to-one association has no affect on the entity's database representation, "
"flush still cascades the save-update operation to the locally changed "
"association."
msgstr ""

#. Tag: programlisting
#: readonly.xml:599
#, no-c-format
msgid ""
"// get a contract with an existing plan;\n"
"// make the contract read-only and change to a new plan\n"
"tx = session.beginTransaction();\n"
"Contract contract = ( Contract ) session.get( Contract.class, contractId );\n"
"session.setReadOnly( contract, true );\n"
"Plan newPlan = new Plan( \"new plan\"\n"
"contract.setPlan( newPlan);\n"
"tx.commit();\n"
"\n"
"// get the same contract\n"
"tx = session.beginTransaction();\n"
"contract = ( Contract ) session.get( Contract.class, contractId );\n"
"newPlan = ( Contract ) session.get( Plan.class, newPlan.getId() ); \n"
"\n"
"// contract.getPlan() still refers to the original plan;\n"
"// newPlan is non-null because it was persisted when \n"
"// the previous transaction was committed; \n"
"\n"
"tx.commit();\n"
"session.close();"
msgstr ""

#. Tag: title
#: readonly.xml:604
#, no-c-format
msgid "Unidirectional one-to-many and many-to-many"
msgstr ""

#. Tag: para
#: readonly.xml:606
#, no-c-format
msgid ""
"Hibernate treats unidirectional one-to-many and many-to-many associations "
"owned by a read-only entity the same as when owned by an entity that is not "
"read-only."
msgstr ""

#. Tag: para
#: readonly.xml:613
#, no-c-format
msgid ""
"Hibernate dirty-checks unidirectional one-to-many and many-to-many "
"associations;"
msgstr ""

#. Tag: para
#: readonly.xml:618
#, no-c-format
msgid ""
"The collection can contain entities that are read-only, as well as entities "
"that are not read-only."
msgstr ""

#. Tag: para
#: readonly.xml:624
#, no-c-format
msgid ""
"Entities can be added and removed from the collection; changes are flushed "
"to the database."
msgstr ""

#. Tag: para
#: readonly.xml:629
#, no-c-format
msgid ""
"If automatic versioning is used, Hibernate will update the version due to "
"changes in the collection if they dirty the owning entity."
msgstr ""

#. Tag: title
#: readonly.xml:640
#, no-c-format
msgid "Bidirectional associations"
msgstr ""

#. Tag: title
#: readonly.xml:643
#, no-c-format
msgid "<title>Bidirectional one-to-one"
msgstr ""

#. Tag: para
#: readonly.xml:645
#, no-c-format
msgid "If a read-only entity owns a bidirectional one-to-one association:"
msgstr ""

#. Tag: para
#: readonly.xml:652
#, no-c-format
msgid "Hibernate does not dirty-check the association."
msgstr ""

#. Tag: para
#: readonly.xml:657
#, no-c-format
msgid ""
"updates that change the association reference to null or to refer to a "
"different entity will not be flushed to the database."
msgstr ""

#. Tag: para
#: readonly.xml:664
#, no-c-format
msgid ""
"If automatic versioning is used, Hibernate will not increment the version "
"due to local changes to the association."
msgstr ""

#. Tag: para
#: readonly.xml:673
#, no-c-format
msgid ""
"If an entity is of an immutable class, and it owns a bidirectional one-to-"
"one association, then its reference must be assigned when that entity is "
"first created. Because the entity is automatically made read-only, these "
"references cannot be updated."
msgstr ""

#. Tag: para
#: readonly.xml:683
#, no-c-format
msgid ""
"When the owner is not read-only, Hibernate treats an association with a read-"
"only entity the same as when the association is with an entity that is not "
"read-only."
msgstr ""

#. Tag: title
#: readonly.xml:693
#, no-c-format
msgid "<title>Bidirectional one-to-many/many-to-one"
msgstr ""

#. Tag: para
#: readonly.xml:695
#, no-c-format
msgid ""
"A read-only entity has no impact on a bidirectional one-to-many/many-to-one "
"association if:"
msgstr ""

#. Tag: para
#: readonly.xml:702
#, no-c-format
msgid ""
"the read-only entity is on the one-to-many side using an inverse collection;"
msgstr ""

#. Tag: para
#: readonly.xml:708
#, no-c-format
msgid ""
"the read-only entity is on the one-to-many side using a non-inverse "
"collection;"
msgstr ""

#. Tag: para
#: readonly.xml:714
#, no-c-format
msgid ""
"the one-to-many side uses a non-inverse collection that contains the read-"
"only entity"
msgstr ""

#. Tag: para
#: readonly.xml:721
#, no-c-format
msgid "When the one-to-many side uses an inverse collection:"
msgstr ""

#. Tag: para
#: readonly.xml:727
#, no-c-format
msgid ""
"a read-only entity can only be added to the collection when it is created;"
msgstr ""

#. Tag: para
#: readonly.xml:733
#, no-c-format
msgid ""
"a read-only entity can only be removed from the collection by an orphan "
"delete or by explicitly deleting the entity."
msgstr ""

#. Tag: title
#: readonly.xml:744
#, no-c-format
msgid "<title>Bidirectional many-to-many"
msgstr ""

#. Tag: para
#: readonly.xml:745
#, no-c-format
msgid ""
"Hibernate treats bidirectional many-to-many associations owned by a read-"
"only entity the same as when owned by an entity that is not read-only."
msgstr ""

#. Tag: para
#: readonly.xml:752
#, no-c-format
msgid "Hibernate dirty-checks bidirectional many-to-many associations."
msgstr ""

#. Tag: para
#: readonly.xml:757
#, no-c-format
msgid ""
"The collection on either side of the association can contain entities that "
"are read-only, as well as entities that are not read-only."
msgstr ""

#. Tag: para
#: readonly.xml:763
#, no-c-format
msgid ""
"Entities are added and removed from both sides of the collection; changes "
"are flushed to the database."
msgstr ""

#. Tag: para
#: readonly.xml:769
#, no-c-format
msgid ""
"If automatic versioning is used, Hibernate will update the version due to "
"changes in both sides of the collection if they dirty the entity owning the "
"respective collections."
msgstr ""

Other Hibernate examples (source code examples)

Here is a short list of links related to this Hibernate readonly.po source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.