category theory – The most basic formulation of a **universal property**

I’m reading Riehl’s category book, and she says in the first section of the second chapter (I quote): The most basic formulation of a universal property is to say that a particular object defines an initial or terminal object in its ambient category.

In what sense is an initial or terminal object universal in the category it lives in? is it perhaps regarding the idea that, for instance, an initial object has a unique form of perceiving every object in the ambient category?…

inheritance – Doctrine can’t access child property for uniqueConstraint

It is after having searched arround doctrine doc that I come to ask this question which is software design related.

A class B inherits from a class A.

The class B cannot declare a uniqueness constraint on the fields of the class A and those of the class B because, as they both represent two different table, a table B can’t define constraint for table A fields.

Indeed, when trying to update the database, we get this nice error message:

C:wamp64www...>php bin/console doctrine:schema:update --force

In SchemaException.php line 86:
  There is no column with name 'parameter' on table 'setting_company'.  

Here is a code snippet for some context:

The ‘parent’ Setting entity from which the SettingCompany entity inherits:

 * @ORMEntity()
 * @ORMDiscriminatorMap(
 * value={
 * Setting::COMPANY=SettingCompany::class,
 * Setting::COMPANY_GROUP=SettingCompanyGroup::class, // <- class not represented in this snippet
 * Setting::GROUP=SettingGroup::class, // <- class not represented in this extract
 * Setting::USER=SettingUser::class, // <- class not represented in this snippet
 * }
 * )
 * @ORMDiscriminatorColumn(name="d_type", type="string", length=10)
 * @ORMInheritanceType(value="JOINED")
abstract class Setting implements ParameterHolderInterface

    const COMPANY = 'company';
    const COMPANY_GROUP = 'compgrp';
    const GROUP = 'group';
    const USER = 'user';

     * @ORMId()
     * @ORMColumn(type="integer")
     * @ORMGeneratedValue(strategy="IDENTITY")
    protected ?int $id = null;

     * @ORMManyToOne(targetEntity="AppDomainParameterEntityParam")
     * @ORMJoinColumn(name="parameter", nullable=false, referencedColumnName="code", onDelete="CASCADE")
    protected Param $param;

    // ... Other fields not relevant to the problem


SettingCompany which inherits from Setting :

 * @ORMTable(uniqueConstraints={@ORMUniqueConstraint(name="unq_param_company", columns={"parameter", "company"})}) <-- The problem is here
 * @ORMEntity(repositoryClass="AppDomainSettingRepositorySettingCompanyRepository")
class SettingCompany extends Setting

     * @ORMManyToOne(targetEntity="AppEntityCompany", cascade={"remove"})
     * @ORMJoinColumn(name="company", referencedColumnName="code", onDelete="CASCADE")
    private Company $company;
    //... Other fields not relevant to solving the problem

Of course, this is because I’m trying to define a unique constraint on two fields which are not in the same table.

If I change the inheritanceType for SINGLE_TABLE it’ll work, but it’ll come with serious performance issue when fetching data so I won’t do that.

What I really want to have is this ‘super’ entity Setting so I can manage every sub-Setting entity in the same way through the same interface.

So, I’ve already tried moving the $param field, directly into the child classes. This works, but it is not at all what I want to do.

And I can’t use composed primary key, because doctrine is really bad at handling those one (Can’t make ManyToMany from a ‘composed key entity’). This is really painfull not to be able to use it.

So this is a design issue…

infinity categories – Using the universal property of spaces

The $infty$-category of spaces is known to be the $infty$-category obtained from the (ordinary) category of finite sets by freely adding sifted colimits. (See e.g. Cesnavicius-Scholze §5.1 for a review of this notion and for pointers to Lurie’s HTT where this is proven.)

Can this characterization be used (ideally without referring to the model of quasi-categories) to show other properties, such as:

  • that colimits in spaces are universal (proven by Lurie in HTT Lemma
  • possibly even that $Cat_infty$ is compactly generated by $*$ and $Delta^1$?

magento2 – How can Enable Product (a [website] scope property) can have different values in one specific store view vs All Store?

I have 1 website, 1 store and 2 store views (for English and Finnish languages.),
If “Enable product” scope is website. Then how come it can have different values between these Scope: Default vs All Store Views.
I was expecting that updating one of them updates the other. This is what is happening between default vs Finnish store views. Updating one of them affects the other. But between all store views and each store view updating one of them does not affect the other. I can also ask why even we have Use default value option available if sth has scope of website.

enter image description here

Just switching to

enter image description here

enter image description here

ag.algebraic geometry – Interesting property of a divisor contained in special fiber

Let $(A, mathfrak{m}, kappa=A/mathfrak{m})$ be a local ring and $f:X to operatorname{Spec} (A)$
a scheme. Let $D subset X$ a divisor on $X$ contained in special fiber $D subset f^{-1}(sigma_{mathfrak{m}})$ with associated
ideal sheaf $I_D$.

Assume we know
that $I_D$ is generated by a power of $mathfrak{m}$, means
there exist a $n$ with $I_D = mathfrak{m}^nO_X$. The structure morphism induces
natural morphism of sheaves $mathfrak{m}^n otimes_A kappa to I_D otimes_{O_X} O_D$ and this induces a morphism
on global sections $mathfrak{m}^n to H^0(D, I_D otimes_{O_X} O_D)$.

What do we know about the last morphism? When is that an surjection?