## DDD accessing reference values in Domain layer without repositories

So I have built a domain model and some logic into that. I have created two repositories for two aggregate roots.

My question is how to access to the reference data from these layers?. For example, say we have the following types Elder and Young.

Our application entry points expect Elder or Young as inputs. But, to validate and save this in the database (which has a foreign key to another table PERSON_TYPE which has these 2 values), I need to convert these IDs to store aggregate roots.

Could I create a PersonTypeRepository (in the domain layer) and use it when I persist my aggregate roots? Should this conversion happen in domain layer or should it happen in the application layer? For example, from a service

## Booking Reference Number

I have received my itinerary with my booking ref number. I checked with the airline website and it matches what is in our booking ref number. Is this considered a confirmed ticket? Me and my son is travelling together. We have the same Booking ref number.

Thank you very very much.

## Type of license to use that forces to keep a reference to the authors

I have a small open source library that I’ve written.
I want people to use it while forcing them to keep the authors attribution (a 2 liner in each file) when redistributing it or using it in their project.

Would the MIT license work? or what type of license should I use

## Undefined reference to “spi_register_board_info”

I am trying to build a spi module in kernel 4.14.71.When i try to build the module, it shows a warning “spi_register_board_info” undefined!. the mentioned function is defined in enter link description here

Can somebody help me as to why i am facing this issue.

## How to RENDER multi-level entity reference data in TWIG file in DRUPAL 8?

If A –> B –> C (‘A’ is refering to ‘B’ which furthur refers to ‘C’ content type) Can any one please help me to render all data of C in TWIG file ?

## Reference request: Oldest (non-analytic) geometry books with (unsolved) exercises?

Per the title, what are some of the oldest (non-analytic) geometry books out there with (unsolved) exercises? Maybe there are some hidden gems from before the 20th century out there.

## How to variably choose a cell reference?

I want to reference a cell in an Excel formula. However, I want the row number to be based on a cell value in another cell. For example, I don’t just want to reference cell R2, I want to say, reference the cell that is in column R, and has the row value I have listed in column V2.

## Reference Request: Total Variation Between Dependent and Independent Bernoulli Processes

Let $$X$$ be a random variable taking values in $$\{0,1\}^n$$ with the following distribution. For each coordinate $$i$$, we have $$p_i = P(X_i = 1) = c/\sqrt n$$, where $$c$$ is a (very small) constant. Coordinates $$i$$ and $$j$$ have positive correlations exponentially decaying in $$|i-j|$$, with prefactor $$1/\sqrt n$$, in the following sense: writing $$p_{i,j} = P(X_i = 1, \, X_j = 1)$$, we have $$0 \le p_{i,j} – p_i p_j \le c \exp(-|i-j|)/\sqrt n.$$ This is a dependent Bernoulli process. Let $$\mu$$ denote the law of this.

Also, let $$Y$$ be an independent Bernoulli process with the same marginals: $$P(Y_i = 1) = p_i$$ and coordinates are independent. Let $$\nu$$ denote the law of this.

I want to bound the total variation distance $$\|\mu-\nu\|_\text{TV}$$. In particular, I want to show that the TV distance decays with $$c$$, ie taking $$c \to 0$$ gives $$\text{TV} \to 0$$.

I am aware of the Chen-Stein method for approaching questions like this, but to me this seems better suited when the probabilities $$p_i$$ are order $$1/n$$, and so there are a Poisson number of $$1$$s in the independent case (and the method shows that the same holds for dependent case, under certain conditions). Perhaps one can apply Stein’s method more generally?

Also, the aim of this question isn’t to get a precise answer from someone, but rather a reference or suggested method of approach. The above is a simplified version of my actual problem, but I feel that if I can get a good handle on the above, then I can convert it to my specific case.

## Insecure Direct Object Reference – Change email from client end

I am testing a website that has “Forgot my password” functionality. If user clicks that, his email address will be displayed as a hyperlink. If that is clicked, an email to reset password will be triggered to that Address. As an end user, I can change the hyperlink using Chrome developer tools to point to some other valid email address and trigger password reset to that user. Should I flag this issue? What are the implications this issue might have?

## Drupal 8 + DB select to retrieve medias from a reference field (in nodes)

Inside a node type, I have a reference field to target a media. With a db select, I need to load all related medias of the nodes. For this I use this code:

$database = \Drupal::database();$  result = $database->select('media_field_data', 'm') ->fields('m', ['mid']) ->condition('m.bundle', 'gallery') ->leftjoin('node__field_related_gallery', 'n', 'media_field_data.mid = node__field_related_gallery.field_related_gallery_target_id') ->leftjoin('field_related_gallery_media_field_data', 'd', 'node__field_related_gallery.entity_id = field_related_gallery_media_field_data.nid') ->range(0, 5) ->execute() ->fetchAllKeyed(0, 0); dpm($  result); 

But with this code I get an error and don’t get the related mids. If I remove the line with the leftjoin I get the mids.

How can I proceed to verify if a media is related to a node and get only the media with a related node?

With views I can get easily the results with this query:

SELECT media_field_data.mid AS mid,  field_related_gallery_media_field_data.nid AS  field_related_gallery_media_field_data_nid FROM {media_field_data} media_field_data LEFT JOIN {node__field_related_gallery} node__field_related_gallery ON   media_field_data.mid =   node__field_related_gallery.field_related_gallery_target_id AND   node__field_related_gallery.deleted = '0'  LEFT JOIN {node_field_data} field_related_gallery_media_field_data ON   node__field_related_gallery.entity_id =   field_related_gallery_media_field_data.nid  WHERE (media_field_data.status = '1') AND (media_field_data.bundle IN   ('gallery')) AND (field_related_gallery_media_field_data.nid IS NOT NULL)  LIMIT 26 OFFSET 0 

Thanks.