question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@Property annotation disrupts aggregation mapping

See original GitHub issue

Using 1.4.1

I’m getting this error when trying to aggregate, using a class to specify the aggregation results: MappingException: Error setting value from converter (IdentityConverter) for...

In the handler:

final Dao<Client> clientDao = new Dao<>(Client.class);
final Iterator<ClientAggregate> iterator = clientDao.newAggregation()
        .match(query)
        .lookup(DbCollections.PHONE_NUMBERS, Client.PRIMARY_PHONE_ID, Phone.ID, Client.PRIMARY_PHONE)
        .unwind(Client.PRIMARY_PHONE)
        .aggregate(ClientAggregate.class);

ClientAggregate.java

public class ClientAggregate extends Client {

    @Property(PRIMARY_PHONE)  // <-- causes failure
    private Phone primaryPhone;

}

I’m not sure if this is by design, but I always annotate my fields with PSFS values, so I can make any changes to the values globally instead of refactoring the actual property name.

If I remove the @Property annotation and name the field the same as the as option during the $lookup stage, it works fine. Is there a reason this fails, because it would be nice to use the annotation rather than relying on the actual field name.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nolawnchairscommented, Apr 12, 2019

@Embedded works as expected. Honestly never crossed my mind to use that. I’ll show myself out…

1reaction
evanchoolycommented, Apr 10, 2019

what happens if you use @Embedded there? That’s the correct annotation there…

Read more comments on GitHub >

github_iconTop Results From Across the Web

SVAT: Secure outsourcing of variant annotation and genotype ...
We present SVAT, a method for secure outsourcing of variant annotation and aggregation, which are two basic steps in variant interpretation ...
Read more >
Lanosterol Disrupts Aggregation of Human ... - ACS Publications
Inspired by these experimental observations, we investigate the preventive activity of lanosterol in the aggregate formation of human γD- ...
Read more >
Loss of mRNA surveillance pathways results in ... - NCBI - NIH
We found that increased protein aggregation is a common property of mRNA surveillance mutants suggesting that a failure to degrade these mRNAs ...
Read more >
Lanosterol Disrupts Aggregation of Human γD ... - Squarespace
For reference, next to each binding map, we show the structures highlighting the key protein domains: the N-terminal region. (tan) and the C- ......
Read more >
Efficient and precise single-cell reference atlas mapping with ...
This enables interpretation of new datasets by transferring annotations and metadata of interest from nearby reference cells. Fast mapping ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found