首页 \ 问答 \ Java Hibernate Id问题(Java Hibernate Id Question)

Java Hibernate Id问题(Java Hibernate Id Question)

有什么办法可以从实体创建的AutoGenerated Id生成一个四位数的数字? 例如:人有一个独特的#1。 我想创建另一个数字,看起来像1001.人#130将是1130.我认为我的桌子不会超过9999。

任何帮助将不胜感激。 在此先感谢,尼克


Is there any way I could generate a four digit number from the AutoGenerated Id that the entity creates? For example: Person has a unique #1. And I would like to create another number that looks like 1001. Person #130 would be 1130. I don't think my table is going to be over 9999.

Any help would be greatly appreciated. Thanks in advance, Nick


原文:https://stackoverflow.com/questions/6651925
更新时间:2023-05-21 09:05

最满意答案

我刚刚发现HKEY_LOCAL_MACHINE - > SOFTWARE - > CLASSES包含与HKEY_CURRENT_USER - > SOFTWARE - > CLASSES相同的注册表项。 我已将我的.hod文件与我的Access Client解决方案关联,并将密钥从HKCU复制到HKLM。 现在它适用于所有用户,并在重新启动后保留。


I have just found that the HKEY_LOCAL_MACHINE -> SOFTWARE -> CLASSES contains the same registry Keys as HKEY_CURRENT_USER -> SOFTWARE -> CLASSES. I have associated my .hod file with i Access Client Solution and copied the Keys from HKCU to HKLM. Now it works for all users and persists after restart.

相关问答

更多
  • 我认为你所要求的是不可能的定义,因为如果你给一个远程用户不受限制地访问你的Emacs,这就像让远程用户通过ssh访问shell一样多的“用户欺骗”。 为了拼出来,从安全的角度来看,这可能是一个坏主意。 另外,让两个用户访问一个Emacs的结果不如你所希望的那么好。 它不是设计同时访问的。 这是多年以来,我尝试了,所以事情可能会有一些移动,但是当我做到这一点至少是古怪的。 不过,我会尽量回答你的问题。 听起来您正在考虑这种背后的原因,因为在网络方面,直觉上X11显示器是服务器,X11应用程序是客户端。 这是令 ...
  • 我刚刚发现HKEY_LOCAL_MACHINE - > SOFTWARE - > CLASSES包含与HKEY_CURRENT_USER - > SOFTWARE - > CLASSES相同的注册表项。 我已将我的.hod文件与我的Access Client解决方案关联,并将密钥从HKCU复制到HKLM。 现在它适用于所有用户,并在重新启动后保留。 I have just found that the HKEY_LOCAL_MACHINE -> SOFTWARE -> CLASSES contains th ...
  • 从ls -Abl的输出中可以看出,文件名实际上是.htaccess.txt 。 边注: 为每个.html文件启用SSI在性能方面是一个坏主意。 典型的方法是使用特殊的扩展名(如.shtml ),或在文件上执行位(通过XBitHack )。 在Apache 2.4上,当前的方法是启用INCLUDES过滤器而不是使用AddHandler : AddType text/html .html AddOutputFilter INCLUDES .html ...仍然支持AddHandler server-parse ...
  • 粗略 - 是的,这是可能的。 为了做到这一点,你需要访问我没有在PHP中直接看到的RAM,不确定是否可能,你可以自己研究。 但是,你可以做的是,因为PHP使用内存来运行,你可以利用它并创建一个永远运行并充当服务器的php脚本,它将使用它来编写和读取内存的能力。这将是一个非常简单的工作,因为PHP会自动为你处理,你不必费心去处理地址和东西(描述一个简单的变量声明)。 要访问此运行脚本,您需要检查套接字的工作方式以及如何建立服务器 - 客户端连接。 这篇文章很好地解释了这一点 。 但是,我并不是故意粗鲁,但是通 ...
  • 只需将php输出重定向到临时文件并上传文件即可。 php yourscript.php > /tmp/file.csv echo "put /tmp/file.csv" | sftp user@example.com 如果你想在没有临时文件的情况下这样做,你不能只使用(OpenSSH) sftp因为它无法读取从stdin上传的内容。 (OpenSSH) scp都不行。 您当然可以从PHP代码本身生成文件,如果这更适合您的任务。 只需使用file_put_contents() : file_put_cont ...
  • 这在Linux中是可行的,但Windows Installer使用重新启动管理器来处理替换正在使用的文件。 当Windows Installer检测到正在使用的文件时,它将提示您尝试关闭任何应用程序或在重新引导期间安排替换。 根据您在安装过程中配置UI的方式,您可以绕过提示,但不能在不关闭应用程序的情况下强制进行替换。 That is possible in Linux, however the Windows Installer uses the Restart Manager to handle rep ...
  • 这肯定是许可的问题。 假设你是一个初学者,我建议你去看看技巧。 ~$ sudo chmod 777 -R /var/www/html This is most certainly a permission's issue. Assuming you're a beginner I recommend the whoring-out technique. ~$ sudo chmod 777 -R /var/www/html
  • 既然你使用bufsize=1 ,输出将被缓冲,那么你可以这样做: cmd="sshpass -p 'pass' ssh -Y user@ip -t 'process_image; bash -l'" p = subprocess.Popen(cmd, stdout=subprocess.PIPE, bufsize=1) for line in p.stdout: print(line) ..... 当然,这假定你的命令给你你期望的输出。 Since the output is going ...
  • Ctrl + c使终端向前台进程发送SIGINT (中断信号)。 接收该信号的过程可以选择如何响应,但传统上,它们会优雅地清理和关闭自己。 Ctrl + c makes the terminal send the foreground process a SIGINT (interrupt signal). Processes that receive that signal can choose how to respond, but conventionally, they clean up and c ...
  • 检查您是否有两个ruby版本。 请粘贴以下命令的输出: $ which -a ruby 如果你不止一个而不是留下一个并删除其他人。 删除通过端口安装的ruby版本(yum或任何包管理器)。 删除OS附带的ruby版本(手动硬核rm)。 从具有不同前缀的端口安装ruby版本(/ usr而不是/ usr / local) 重新安装rubygems Check if you have two ruby versions. Please paste the output of following command: ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。