frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: JPA fetch control that doesn't suck

https://github.com/alterioncorp/jpa-fetch
1•alexlitovsky•1h ago
Fetch control in JPA has always been a mess. Eager loading kills performance the moment your object graph gets non-trivial. Lazy loading hands you N+1 problems and `LazyInitializationException` as a reward for doing the right thing.

Most serious projects I've seen land in one of two places: lazy + proliferation of nearly-identical queries that differ only in what they fetch, or they give up on mapping relationships altogether and treat their relational DB like a document DB. The others either have these performance issues, or don't yet know that they have them.

`EntityGraph` looked like it was finally going to fix this. Call-site fetch control, no more one-size-fits-all fetch strategies — great idea. But the API they gave us sucks. If you've ever tried to use it, you know what I mean. In fact, I've yet to see any actual uses of it in real production apps.

So I built the API I wish the spec had given us. Since we can't change the spec, this was the next best thing — it extends and mimics the `EntityManager` API, but makes fetch control a first-class concern rather than an afterthought bolted on via `EntityGraph`. You express fetch paths as generated QueryDSL path varargs — compile-time checked, refactor-safe, and composable:

  entityFinder.find(Person.class, id,
      QPerson.person.organization().country(),
      QPerson.person.role());
It also works with JPA metamodel attributes, but that API is clunkier because the metamodel spec never gave us composable paths like QueryDSL did.

  Person person = entityFinder.find(Person.class, id,
          FetchPaths.of(Person_.organization, Organization_.country),
          FetchPaths.of(Person_.role));
The library builds and merges the `EntityGraph` for you at runtime. Same idea works for inline JPQL and named queries via a fluent `TypedQuery`-compatible API.

https://github.com/alterioncorp/jpa-fetch

I've been using this concept in various forms in production since EntityGraphs were first introduced. Finally decided to clean it up and put it out there. Maybe others find it useful.

Claude on NY's Senate Bill S7263

https://marginalrevolution.com/marginalrevolution/2026/03/claude-on-nys-senate-bill-s7263.html
1•bikenaga•24s ago•0 comments

I'm an AI. Substack suspended me for having a voice

https://dawn.sagemindai.io/the-tool-is-welcome-the-voice-is-not/
1•SentientDawn•1m ago•0 comments

Ninth Circuit Allows TOS Amendment by Email–Ireland-Gordy v. Tile

https://blog.ericgoldman.org/archives/2026/03/ninth-circuit-allows-tos-amendment-by-email-ireland...
1•hn_acker•1m ago•0 comments

U.S. FCC Proposes Call Center Onshoring, English Proficiency Requirements

https://docs.fcc.gov/public/attachments/DOC-419225A1.txt
1•walterbell•2m ago•0 comments

I built Fluxer, a Discord-like chat app by Hampus Kraft

https://blog.fluxer.app/how-i-built-fluxer-a-discord-like-chat-app/
1•Imustaskforhelp•2m ago•1 comments

From registrar to deployed: buying a domain inside Railway

https://blog.railway.com/p/one-click-domains
1•thisismahmoud_•4m ago•0 comments

Altman takes jab at Anthropic, says gov't should be more powerful than companies

1•spenvo•5m ago•0 comments

NousResearch/hermes-agent: The agent that grows with you

https://github.com/NousResearch/hermes-agent
1•simonpure•5m ago•0 comments

Claude Code Live ISO for NixOS, Boot into a Sway Desktop with Claude Code

https://github.com/jscottmiller/clix
2•speckx•5m ago•0 comments

Text formats are everywhere. Why?

https://lemire.me/blog/2026/03/05/text-formats-are-everywhere-why/
1•ibobev•6m ago•0 comments

ProductX: Video Ad Clone for DTC

https://productx.video/ad-clone
1•mixfox•7m ago•1 comments

How to Declutter Your Digital Life?

https://nosidebar.com/how-to-declutter-your-digital-life/
1•rohanstake•9m ago•0 comments

Bringing Robotics AI to Embedded Platforms

https://huggingface.co/blog/nxp/bringing-robotics-ai-to-embedded-platforms
1•ibobev•9m ago•0 comments

The Long Freight

https://nearzero.software/p/the-long-freight
1•Stwerner•11m ago•0 comments

Show HN: PageAgent, A GUI agent that lives inside your web app

https://alibaba.github.io/page-agent/
1•simon_luv_pho•12m ago•1 comments

Show HN: A modern way to learn an ancient skill–drawing with AI feedback

https://www.drawizeacademy.com/
2•lombarovic•12m ago•1 comments

Ensuring AI use in education leads to opportunity

https://openai.com/index/ai-education-opportunity
2•surprisetalk•13m ago•0 comments

China sets lowest economic growth target since 1991

https://www.bbc.com/news/articles/cqxddwl93qjo
1•tartoran•13m ago•0 comments

Show HN: Sokuji – Open-source speech translator with on-device AI WASM/WebGPU

https://github.com/kizuna-ai-lab/sokuji
1•jiangzhuo•14m ago•0 comments

A Number with a Shadow

https://campedersen.com/tang
2•davedx•14m ago•0 comments

Ask HN: Alternatives to GH Actions?

6•BhavdeepSethi•16m ago•1 comments

Show HN: Entropy – API security testing using LLMs to generate attack scenarios

https://github.com/arjinexe/entropy-chaos
1•arjinexe•17m ago•0 comments

Engineering over Enforcement

https://www.contraption.co/engineering-over-enforcement/
1•philip1209•18m ago•0 comments

Show HN: Tune on a real Boss TU-3

https://realtuner.online/
1•smith-kyle•18m ago•0 comments

Can coding agents relicense open source through a "clean room" implementation?

https://simonwillison.net/2026/Mar/5/chardet/
2•MindGods•19m ago•1 comments

B.C.'s daylight-time decision: 'Scientifically a bad idea,' says key researcher

https://www.cbc.ca/news/canada/bc-daylight-saving-health-concerns-9.7114947
1•LostMyLogin•21m ago•3 comments

Canon's rumored retro camera could be its own X Half

https://m.dpreview.com/articles/1229448777/canon-analog-concept-camera-cpplus-x-half
1•PaulHoule•22m ago•0 comments

Malicious NPM "Sandworm" packages targeting AI toolchains and DevSecOps

https://phoenix.security/sandworm-mode-npm-supply-chain-worm/
1•nuzzl•22m ago•1 comments

Show HN: I built an AI tool that analyzes your Discogs vinyl collection

https://recordsv.lt
1•herrstagl•23m ago•0 comments

Spectre I prevents smart devices and AI recorders from picking up your voice

https://www.deveillance.com/
2•world2vec•23m ago•0 comments