Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Steve Ebersole
@sebersole
if you say so
i guess it takes a little getting used to, but the topics are very helpful
Marc Magon
@GedMarc
Hey All,
Anyone found the bytebuddy update after 1.11.13 fails for the hibernate-enhancer? SuffixNameResolver no longer exists as a class in the library?
mtxset
@mtxset
Hello, is it possible in hmb.xml to subselect dynamically OR select class dynamically OR load some A.hbm.xml or B.hbm.xml during runtime based on some param? I would like to execute different views which return same data, but differently during runtime
mtxset
@mtxset
yes it's possible, you create a function which returns table then do if and inside if else put returns query select * ...
DoraRajappan
@DoraRajappan
org.springframework.transaction.IllegalTransactionStateException: Pre-bound JDBC Connection found! HibernateTransactionManager does not support running within DataSourceTransactionManager if told to manage the DataSource itself. It is recommended to use a single HibernateTransactionManager for all transactions on a single DataSource, no matter whether Hibernate or JDBC access.
migrating from hibernate 3.x to 5.x
any clue to fix this
Steve Ebersole
@sebersole
Not sure how many more times to tell you @DoraRajappan but, as per subject on this very chat, we have moved to Zulip for chats
I'll leave it at that this time
But I will say that HibernateTransactionManager is a Spring class, not a Hibernate class. Not sure why people routinely come ask us about issues using Hibernate via Spring
Dmitrii Bocharov
@bdshadow
Hello everyone! Dear hibernate team, may i ask you please to take a look at https://hibernate.atlassian.net/browse/HHH-15098. The problem is with basic functionality (orphan removal on merge). In the comments, I have provided a test right in the source code of hibernate-orm. Also there are links to stackoverflow discussions in the description. Thanks in advance
Al Grant
@bigal_nz_twitter
Hi guys
Omid Dehghan
@odchan1_twitter
Hey everyone :)
I have a website and published in there 1500 SEO optimized articles related to teaching the core of a few programming languages. Now I decided to sell the site. Please send me a DM if you're interested in.
P.S: I know the request is not specifically relative to the community, but I thought it might be a public interest.
Thank you
DoraRajappan
@DoraRajappan
I have @Transactional in repositoryImpl class method. But transactionInterceptor is intiated before call comes to repositoryImplClass ie after it hits the service class method not having @Transactional after spring 5.2 upgrade
Holothuroid
@Holothuroid
Hello. I am on Spring Boot 2.6.7 which includes Hibernate 5.6.8. I have jakarta.xml.bind-api:jar:4.0.0 on class path. The app starts usually. When I try to run an @SpringBootTest with H2, I get ClassNotFoundException: javax.xml.bind.JAXBException. Considering that Hibernate 5.5. supports Jakarta, I would have thought, that it's looking for jakarta.xml.bind.JAXBException. Not javax. What's going on here?
Steve Ebersole
@sebersole
So @Holothuroid #1, yet again, this is not the place to come for Hibernate support. It is mentioned in the room subject and pretty much every discussion iuf you scroll up. Personally I don't care, you just got lucky that I happened to see this - if you want consistent timely help, use the forum or Zulip. #2, are you using the jakarta variants of those artifacts? javax is still the primary target for versions inclusing 5.6; we switched to jakartaprimarily starting in 6.0. So for 5.5, you'd need to be sure to use the jakarta variant (hibernate-core-jakarta e.g.)
DoraRajappan
@DoraRajappan
Caused by: java.lang.ClassCastException: org.hibernate.type.descriptor.converter.AttributeConverterTypeAdapter cannot be cast to org.hibernate.type.VersionType
Error creating bean with name 'globalSessionFactory' defined in com.trgr.cobalt.dataroom.datasource.config.global.GlobalDataSourceConfiguration: Invocation of init method failed; nested exception is org.hibernate.MappingException: Could not instantiate persister org.hibernate.persister.entity.SingleTableEntityPersister
at
Steve Ebersole
@sebersole
Happy to answer you on Zulip @DoraRajappan
DoraRajappan
@DoraRajappan
ok
thx
DoraRajappan
@DoraRajappan
can i have the exact zulip chat url
Steve Ebersole
@sebersole
Do you see the subject for this room?
It is literally in the subject
DoraRajappan
@DoraRajappan
wow thanks
Tratotui
@tratotui

Hello everyone!

I need your help so much. I've not resolved one problem.... May be i don't understand some kernel's things, but hope - its so easy for nice community:
First of all: i'm using dymanic-map entity mode(i know it is not elegant approach...)

<hibernate-mapping xmlns="http://www.hibernate.org/xsd/hibernate-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.hibernate.org/xsd/hibernate-mapping http://www.hibernate.org/xsd/hibernate-mapping/hibernate-mapping-4.0.xsd">
    <class entity-name="UserInfo" schema="MDM_DATA" table="UserInfo">
        <tuplizer entity-mode="dynamic-map" class="org.hibernate.tuple.entity.DynamicMapEntityTuplizer"/>
        <id column="user_id" name="user_id" type="long">
            <generator class="identity"/>
        </id>
        <property column="lastName" name="lastName" type="text"/>
        <property column="firstName" name="firstName" type="text"/>
        <property name="lastrec" type="int" generated="insert">
            <column name="lastrec" default="1" not-null="true"/>
        </property>
        <property name="recdateend" type="timestamp" generated="insert">
            <column name="recdateend" default="CAST('01/01/3000' as timestamp)" not-null="true"/>
        </property>
        <property name="recdatebegin" type="timestamp" generated="insert">
            <column name="recdatebegin" default="current_timestamp" not-null="true"/>
        </property>
        <property name="recdatenew" type="timestamp" generated="insert">
            <column name="recdatenew" default="current_timestamp" not-null="true"/>
        </property>
        <set lazy="false" inverse="true" cascade="all" name="UserExtraParam">
            <key column="user_id"/>
            <one-to-many class="UserExtraParam"/>
        </set>
    </class>
    <class entity-name="UserExtraParam" schema="MDM_DATA" table="UserExtraParam">
        <tuplizer entity-mode="dynamic-map" class="org.hibernate.tuple.entity.DynamicMapEntityTuplizer"/>
        <id column="user_id" name="user_id" type="long">
            <generator class="foreign">
                <param name="property">UserInfo</param>
            </generator>
        </id>
        <property column="param_value" name="param_value" type="text"/>
        <property column="param_key" name="param_key" type="text"/>
        <many-to-one name="UserInfo" column="user_id" lazy="proxy" insert="false" update="false" class="UserInfo" not-null="false"/>
    </class>
</hibernate-mapping>

And when i want to receive all data by query(something like this):

select ent from UserInfo ent

I get a infinite recursive error (when i suppose hibernate try to get UserExtraParam for UserInfo):

Hibernate: select userinfo0_.user_id as user_id1_1_, userinfo0_.lastName as lastname2_1_, userinfo0_.firstName as firstnam3_1_, userinfo0_.recdatebegin as recdateb4_1_, userinfo0_.recdateend as recdatee5_1_, userinfo0_.recdatenew as recdaten6_1_, userinfo0_.lastrec as lastrec7_1_ from "MDM_DATA".UserInfo userinfo0_
Hibernate: select userextrap0_.user_id as user_id1_0_0_, userextrap0_.user_id as user_id1_0_1_, userextrap0_.param_key as param_ke2_0_1_, userextrap0_.param_value as param_va3_0_1_ from "MDM_DATA".UserExtraParam userextrap0_ where userextrap0_.user_id=?
....
(last query repeat N-over times)
nightswimmings
@nightswimmings
Hi mates! I am using latest Hibernete 5 but I am desperate trying to implement soft delete with @FilterDefs or @Wheres on my entities. The former don't seem to work on some JPA derived methods, including findById (https://hibernate.atlassian.net/browse/HHH-11485) but also findAll(). The later I could not find a solution to deactivate it programatically (I tried spi, Aspects and almost everything to remove the where conditions from the metadata/entity persisters) . What do you suggest?
Steve Ebersole
@sebersole
Personally I'd suggest following the guideline in the room's subject and ask this on Zulip ;)
nightswimmings
@nightswimmings
you are right sorry! I wasnt aware!!
semih
@semih
Hi i have a question. how to create a nested entity in an entity ?
Raúl Pampliega Mayoral
@RaulPampliegaMayoral
image.png
Hi all! I have a requirement to make our application to work with Postgresql, Oracle and SQL Server. All is working fine in all 3 database except the @Lob mapping in a string property. For Oracle and SQLServer is working correctly (varchar(max) and clob ) but for Postgresql what I want is the text type but it's been mapping as oid.
What i've done is create a dialect for Postgresql and overwrite getTypeName and remapSqlTypeDescriptor as is shown in the screenshot. There are any better way for doing this?
Thanks in advance!!!
1 reply
Raúl Pampliega Mayoral
@RaulPampliegaMayoral
Hi all again! Does anyone know how to set a default agnostic value for boolean types in order to work in postgresql and oracle?