Menu
  • HOME
  • TAGS

Should I use Git branches to store unrelated code?

git,version-control,git-branch,orphan,branching-strategy

Like you mentioned, you can accomplish this with orphan branches. git checkout --orphan script-branch git reset --hard touch my-script.sh git add my-script.sh git commit -m 'Script commit' Now if you do a git log, you will only see 'Script commit' in the history. There is nothing inherently wrong with this...

Symfony2: Disconnect Associations on delete

php,symfony2,doctrine2,relationships,orphan

You can achieve this with the doctrine ondelete behaviour that can null the references. Here an example of how I implemented this in an old sf2.3 project: /** * Workaround for circular reference: * http://stackoverflow.com/questions/14257004/doctrine2-symfony2-cascading-remove-integrity-constraint-violation-1451 */ /** * @ORM\OneToOne(targetEntity="Acme\DashboardBundle\Entity\AlternativeProposal") * @ORM\JoinColumn(name="selected_alternative_id", referencedColumnName="id", nullable=true, onDelete="SET NULL") */ protected...

Setting orphanRemoval to true while migrating children from their parent to another parent

hibernate,jpa,eclipselink,orphan,orphaned-objects

This is documented in the JPA specification. Section 3.2.4 (excerpt): The semantics of the flush operation, applied to an entity X are as follows: If X is a managed entity, it is synchronized to the database. For all entities Y referenced by a relationship from X, if the relationship to...