Comments (5)
Hmm I would say this should be already working.
from mikro-orm.
Maybe I'm not looking at the right place but this is the definition for EmbeddedOptions
:
export type EmbeddedOptions = {
entity?: string | (() => AnyEntity | AnyEntity[]);
type?: string;
prefix?: string | boolean;
nullable?: boolean;
object?: boolean;
array?: boolean;
hidden?: boolean;
serializer?: (value: any) => any;
serializedName?: string;
};
in node_modules/@mikro-orm/core/decorators/Embedded.d.ts
(I'm using "@mikro-orm/core": "^6.1.11"
).
It doesn't seem to have a name
property available.
from mikro-orm.
Ok, but that might be just a type-level issue, have you tried to put it in (and cast the options as any
)?
from mikro-orm.
I just gave it a try.
On insert, it skips the field, meaning the document created in mongoDB doesn't have the data, neither with the class attribute name nor the decorator config name.
On select, it throws an error TypeError: Cannot read properties of undefined (reading 'object')
(at node_modules/@mikro-orm/core/utils/EntityComparator.js:266:88
).
from mikro-orm.
@maphe I got the same error as well but with node_modules/@mikro-orm/core/metadata/MetadataValidator.js:17
from mikro-orm.
Related Issues (20)
- nativeDelete is not supplying table alias in all instances HOT 2
- (Multi-instances, PostgreSqlDriver) Transaction query already complete, run with DEBUG=knex:tx for more info
- Wrong migration schema generated when use EntityCaseNamingStrategy HOT 1
- Virtual properties defined as getters are recognized as required by RequiredEntityData HOT 3
- Partially loaded entities - Checking for the existence of non-loaded fields returns true, should return false HOT 6
- Sorting by relation does not work with `fields` or `populate` option HOT 1
- Cannot run Mikro-ORM migrations on bun
- Updating fields that are not present in the objects HOT 2
- Populate order by not working with select-in strategy HOT 6
- Local timezone can't be used in mssql driver HOT 2
- em.upsert does not return or update entites already stored inside the entity manager
- Broken migration in 6.2.9 ?
- Table alias in Property formula not escaped correctly HOT 1
- Order of SQL parameters when using QueryBuilder with raw helper is not correct HOT 2
- tsserver performance issues caused by core imports HOT 8
- Correctly build where query for getSingleResult QueryBuilder method HOT 2
- ConstructorParams in metadata are not discovered correctly HOT 1
- Error when upserting null value for a nullable embeddable array property
- TypeError: undefined is not an object (evaluating 'previous.stack.split')
- Unable to Customize TypeScript Naming Strategy for Entities that are auto generated
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 mikro-orm.