Skip to main content

Home/ SoftwareEngineering/ Group items matching "cascade" in title, tags, annotations or url

Group items matching
in title, tags, annotations or url

Sort By: Relevance | Date Filter: All | Bookmarks | Topics Simple Middle
kuni katsuya

Java Persistence/Relationships - Wikibooks, open books for an open world - 0 views

  • Cascading
  • following operations can be cascaded, as defined in the cascadeType enum:
  • PERSIST
  • ...11 more annotations...
  • If persist() is called on the
  • parent
  • and the
  • child
  • is also new, it will also be persisted
  • MERGE
  • REFRESH
  • REMOVE
  • . If remove() is called on the parent then the child will also be removed
  • . If merge() is called on the parent, then the child will also be merged
  • If refresh() is called on the parent then the child will also be refreshed
kuni katsuya

Java Persistence/Advanced Topics - Wikibooks, open books for an open world - 0 views

  • Events
  • hook into a system that allows the execution of some code when the event occurs
  • JPA defines several events for the persistent
  • ...37 more annotations...
  • life-cycle
  • of Entity objects
  • JPA defines the following events:
  • PostLoad
  • PrePersist
  • PostPersist
  • PreUpdate
  • PostUpdate
  • PreRemove
  • PostRemove
  • after an Entity is loaded into the
  • persistence context
  • before the persist operation is invoked on an Entity
  • after a refresh operation.
  • before the remove operation is invoked on an Entity
  • cascade of a remove operation
  • during a flush or commit for orphanRemoval in JPA 2.0
  • after an instance is deleted from the database
  • occurs during a flush or commit operation
  • after the database DELETE has occurred
  • before the transaction is committed
  • after an instance is updated in the database
  • occurs during a flush or commit operation
  • after the database UPDATE has occurred
  • before the transaction is committed
  • before an instance is updated in the database
  • occurs during a flush or commit operation
  • after the database UPDATE has occurred
  • before the transaction is committed
  • after a new instance is persisted to the database
  • occurs during a flush or commit operation
  • after the database INSERT has occurred
  • before the transaction is committed
  • Id of the object should be assigned
  • merge for new instances
  • cascade of a persist operation
  • Id of the object may not have been assigned, and code be assigned by the event
kuni katsuya

Java Persistence/Persisting - Wikibooks, open books for an open world - 0 views

  • Persist
  • used to insert a new object into the database
  • it just registers it as new in the persistence context (transaction)
  • ...6 more annotations...
  • Merge
  • When the transaction is committed, or if the persistence context is flushed, then the object will be inserted into the database
  • used to merge the changes made to a detached object into the persistence context
  • it merges the changes into the persistence context (transaction)
  • When the transaction is committed, or if the persistence context is flushed, then the object will be updated in the database.
  • merge is only required when you have a detached copy of a persistence object
kuni katsuya

MySQL Error Number 1005 Can't create table '.mydb#sql-328_45.frm' (errno: 150) | VerySimple - 0 views

  • MySQL Error Number 1005 Can’t create table
  • (errno: 150)
  • SHOW ENGINE INNODB STATUS
  • ...12 more annotations...
  • Known Causes:
  • First Steps:
  • dreaded errno 150:
  • The two key fields type and/or size is not an exact match
  • One of the key field that you are trying to reference does not have an index and/or is not a primary key
  • One or both of your tables is a MyISAM table
  • You have specified a cascade ON DELETE SET NULL, but the relevant key field is set to NOT NULL
  • Make sure that the Charset and Collate options are the same both at the table level as well as individual field level for the key columns
  • You have a default value (ie default=0) on your foreign key column
  • You have a syntax error in your ALTER statement or you have mistyped one of the field names in the relationship
  • The name of your foreign key exceeds the
  • max length of 64 chars
    • kuni katsuya
       
      64 char max? seriously??? in this century?!
1 - 4 of 4
Showing 20 items per page