Comments (5)
System.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated.
Please check the length of your columns, this exception is usually caused by the length of content exceeds the column's length definition.
And since you have called AddIdentityMappingsForSqlServer
, AppUser
should be mapped as joined-subclass
, please check the mapping file AppUser.hbm.xml
in the WebTest project, I think Fluent Hiberate can do joined subclass mapping too.
Please use the sql scripts in the database folder to create your identity tables, because it is more accurate then the SchemaUpdate
.
from nhibernate.aspnetcore.identity.
Thanks for your reply. Strangely I was able to run the SQL statement manually, not entirely sure what was going on there. I have tried to add AppUser
as a SubClassMap
but it appears it is not picked up properly. Looking into it, based on this issue I don't think that is possible to have a joined-subclass
in Fluent Hiberate when the base is in an xml file. What would your advice be for this? With my very limited knowledge of NHiberate I think I have 2 options:
- Create FluentMappings based of the AppUser.hbm.xml
- Don't use FluentHiberate and create my own *.hbm.xml
from nhibernate.aspnetcore.identity.
I have seen the issue, it seems joined-subclass
mapping is not supported by FluentNHibernate know. But you have 3 options:
- Create all mappings for all classes, include
NHibernate.AspNetCore.Identity
's classes , please refer to the exists hbm mappings; - Just use
*.hbm.xml
files , don't use FluentHiberate; - Use NHibernate.Mapping.Attributes, it support
joined-subclass
mapping with the existing hbm xml mapping , which I have tested with it before。
Personaly, I prefer to use xml mapping (*.hbm.xml), because both
FluentHiberate
andNHibernate.Mapping.Attributes
will translate it's mapping to xml mapping at runtime. And with the help of NHibernate's xml schema (nhibernate-configuration.xsd and nhibernate-mapping.xsd) file, editing hbm file with intelli popup is easy too.
from nhibernate.aspnetcore.identity.
Thanks for your thoughts and insights on this, it has been very helpful!
from nhibernate.aspnetcore.identity.
you are welcome. If there is nothing else, I think this issue can be closed.
from nhibernate.aspnetcore.identity.
Related Issues (20)
- readme and sample usage HOT 2
- UpperCase of role's id HOT 1
- The mapping of concurrencyStamp looks invalid HOT 5
- No persister for: NHibernate.AspNetCore.Identity.IdentityUserRole HOT 7
- map ConcurrencyStamp of IdentityUser and IdentityRole as version HOT 1
- SqlException: Incorrect syntax near the keyword 'public'. HOT 8
- Refact to use NHibernate.Mapping.ByCode HOT 2
- Create User - Row was updated or deleted by another transaction HOT 9
- Correct way using of UserManager HOT 6
- implement user only store HOT 1
- Make id property type configurable HOT 4
- Table names in mapping does not match table names in SQL scripts HOT 3
- Error while creating new user in PostgreSQL HOT 4
- Wrong mapping table IdentityUserClaim. True value is AspNetUserClaims HOT 5
- Oracle Error Identifier is too long HOT 6
- ConfigurationExtensions.AddIdentityMappings doesn't at the correct mappings for a "property" value of NHibernate.Dialect.MsSql2012Dialect, NHibernate, Version=5.3.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4 HOT 4
- NHibernate.ISession still open when using signalr HOT 9
- Cannot derive from IdentityUser/IdentityRole HOT 1
- MySQL bindings HOT 1
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 nhibernate.aspnetcore.identity.