Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 25th, 2012  |  syntax: None  |  size: 0.44 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Doctrine2 Transient fields (like JPA)?
  2. @Transient int transient;
  3.        
  4. /** @Entity */
  5. class MyPersistentClass
  6. {
  7.     /** @Column(type="integer") */
  8.     private $id; // will be persisted because it has a mapping
  9.  
  10.     private $name; // won't be persisted because it does not have a mapping
  11. }
  12.        
  13. class MyPersistentClass extends MyPersistentClassModel{
  14.    private name; // persisted
  15. }
  16.  
  17.  
  18. class MyPersistentClassModel{
  19.    private nickname // not persisted
  20. }