Comments (2)
Hi @tkausl I made a bit of a mistake with this. I wrote this package well over a year ago and started writing tests a week ago. I realised I hadn't used the parent method and this only works for children. So at the moment a child can be saved with one or more parents but a parent cannot be saved with one or more children. I tried a quick fix last week and this needs more thought. I've realised I need to do the following
- Save parent object first
- build each child with polymorphic relations
- save all children
Which doesn't sound difficult! However there can be many definitions! Therefore I need to do this in an async method with both children and parent relations which is the difficult bit. When I get a spare day or two I'll give it a go! Really need a rethink of the structure
from typeorm-polymorphic.
Having the same issue (val.slice is not a function
), but when just trying to find parent.
from typeorm-polymorphic.
Related Issues (18)
- how can i get children of parent HOT 1
- [Question] Does this library support many-to-many polymorphic relation? HOT 3
- Possible bug: polymorphic entity creation not working HOT 1
- Relation with property path ** in entity was not found HOT 3
- Entity type is always null when eager loading HOT 1
- Entity does not have a primary column. HOT 1
- Polymorphic Inheritance HOT 1
- Massive refactor for clean up required HOT 2
- Subject is undefined when working with soft-deleted entities. HOT 1
- Polymorphic from parent not work HOT 3
- The implementation in the readme is wrong. HOT 3
- How to get children of parent
- Where is version 0.0.10? HOT 1
- How to use in nestjs? HOT 4
- Children not populated when retrieving parent
- Update to work with newer TypeORM version HOT 1
- Creates N queries for hydrateMany HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typeorm-polymorphic.