在HNibernate中使用代码映射忽略列(Ignore column using mapping by code in HNibernate)
我在NHibernate中使用代码映射。 我有一个有几个属性的类。 其中之一与DB中的任何列无关,但仍有getter和setter。
我使用ConventionModelMapper而不是ModelMapper。 第一个假设所有属性都被映射。
我可以告诉NHibernate忽略它?
I'm using mapping by code in NHibernate. I got a class with several properties. One of them is not related to any columns in DB but still has getter and setter.
I use ConventionModelMapper not ModelMapper. The first one assumes that all properties are mapped.
How i can tell to NHibernate to ignore it?
原文:https://stackoverflow.com/questions/7658647
最满意答案
错误'C:/ wamp / www'@'localhost'告诉你试图连接的用户是'C:/ wamp / www',而不是'root'。 你可以通过打印出来来检查$ dbconfig中的内容吗?
在phpmyadmin配置中更改密码实际上并不会从数据库本身更改密码。 Phpmyadmin只是一个客户端,而不是数据库。
要更改数据库中的密码,您应该使用任何客户端(如phpmyadmin)在'mysql'数据库'用户'表中更改它:
从phpmyadmin配置中删除用户名和密码 - 它将允许您使用网络形式登录。
打开phpmyadmin并使用默认的用户名/密码对。 默认情况下,它很可能是'root',没有密码。
转到users表,使用'localhost'主机搜索'root'用户并将密码更改为PASSWORD('father2242')
保存行
重新启动MySQL服务
之后的一切都应该起作用 - 你将允许root用户使用你选择的密码从本地主机访问。
Error 'C:/wamp/www'@'localhost' tells that user you try to connect with is 'C:/wamp/www', not 'root'. Could you check what is actually inside $dbconfig by printing it out?
Changing password in phpmyadmin config doesn't actually change password from database itself. Phpmyadmin is just a client, not database.
To change password from database you should change it in 'users' table in 'mysql' database using any client (like phpmyadmin):
Remove username and password from phpmyadmin config - it will allow you to login using web-form.
Open phpmyadmin and use default user/password pair. Most likely it is 'root' without password by default.
Go to users table, search for 'root' user with 'localhost' host and change password to PASSWORD('father2242')
Save row
Restart MySQL service
Everything should work after that - you will have root user allowed to access from localhost with password you chose.
相关问答
更多-
错误'C:/ wamp / www'@'localhost'告诉你试图连接的用户是'C:/ wamp / www',而不是'root'。 你可以通过打印出来来检查$ dbconfig中的内容吗? 在phpmyadmin配置中更改密码实际上并不会从数据库本身更改密码。 Phpmyadmin只是一个客户端,而不是数据库。 要更改数据库中的密码,您应该使用任何客户端(如phpmyadmin)在'mysql'数据库'用户'表中更改它: 从phpmyadmin配置中删除用户名和密码 - 它将允许您使用网络形式登录。 ...
-
您需要在WAMP环境中设置新的root密码。 它有一个与XAMPP中不同的MySQL实例,因此它不会获取相同的root密码。 更改root密码并再次尝试连接,这应该有效。 You need to set a new root password within your WAMP environment. It has a different instance of MySQL to the one in XAMPP, so it won't pick up the same root password. Ch ...
-
无法在线访问wamp项目(can't access wamp projects online)[2021-12-24]
在Moodle文件夹中的“Config.php” 78.10*.***.*** (wwwroot='localhost')更改为78.10*.***.*** 。 要使moodle文件夹成为根目录,请执行以下操作: 您将需要在httpd.conf文件/wamp/apache2/conf/httd.conf中编辑两件内容: DocumentRoot "/wamp/www" 改成 DocumentRoot "your_moodle_folder" 然后找到:改 ... -
phpMyAdmin访问被拒绝(phpMyAdmin access denied)[2022-06-11]
在你的phpmyadmin config.inc.php中尝试这个: - $cfg['Servers'][$i]['verbose'] = 'localhost'; $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['port'] = '3306'; $cfg['Servers'][$i]['socket'] = ''; $cfg['Servers'][$i]['connect_type'] ... -
wamp服务器本地拒绝?(wamp server locally denied?)[2023-03-15]
在这里看到我的老指导,我的许多朋友有这个错误,这个指南的工程http://www.hieule.info/site/web/solve-the-denied-access-problem-when-using-wamp-server-2 -on-windows-8-希望这也适用于你。 See my old guide here, many of my friend has this error and this guide works http://www.hieule.info/site/web/solv ... -
拒绝访问mysql(Access denied to mysql)[2021-12-19]
它不是特别安全,但如果您将帐户名称添加到my.ini文件以及密码,它将适合您 # The following options will be passed to all MySQL clients [client] user = "Fred" password = "Bloggs" port = 3306 socket = /tmp/mysql.sock ... Its not particularly secure but if you add the acc ... -
如何在drupal的wamp服务器上找到现有的用户名和密码(How to find out existing user-name and password on wamp server of drupal)[2022-12-14]
解决这个问题的最佳方法是在我看来重新安装Drupal。 似乎数据库创建错误,您的用户表已损坏。 尝试通过仪表板创建另一个用户,然后在settings.php中更改root用户的值。 在$ database变量中。 它可能会解决您的问题。 问候。 The best way to fix it is re-installing Drupal, in my opinion. It seems the Database has created wrong, and your users table is corru ... -
所以我在谷歌上搜索,但我没有尝试过。 所以我继续Youtube,在那里我找到了答案。 我会在这里发布Youtube密码视频链接,因为它比解释更容易,但我会给出一个简短的总结。 它是通过命令行完成的,并生成一个名为“mysql-init.txt”的.txt文件。 所以我必须创建一个.txt文件,其中包含使用mysql的命令并更新mysql.user表,并更新密码,然后刷新权限。 然后不得不关闭mysql服务器服务。 之后,我将“my.ini”文件移动到mysql服务器的文件夹中(对我来说是“MySQL Ser ...
-
当您安装WAMP时,它会附带一个标准的MySQL安装。 MySQL的标准用户是root ,没有密码。 在您添加自己的用户ashish ,您需要以root身份登录并添加此用户(或者只使用root用于测试)。 When you install WAMP, it comes with a standard install of MySQL. The standard user for MySQL is root and there is no password. Before you can add your o ...
-
WAMP服务器访问被拒绝(WAMP server Access Denied)[2023-10-10]
编辑config.inc.php文件。 $cfg['Servers'][$i]['verbose'] = 'localhost'; $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['port'] = '3306'; $cfg['Servers'][$i]['socket'] = ''; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['extensi ...