You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm following an online tutorial, but came across an error which I am not able to resolve.
[ERROR] Errors:
[ERROR] ArtistRepositoryTest.shouldCreateAndFindAnArtist:27 » IllegalArgument Not an entity [class org.agoncal.quarkus.jdbc.Artist]
Making the same steps as shown in course. Even copyed the file sources from the repo to try to fix the issue.
ArtistRepositoryTest.java
package repository;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.sql.SQLException;
import org.agoncal.quarkus.jdbc.Artist;
import org.agoncal.qurkus.panache.repository.ArtistRepository;
import org.junit.jupiter.api.Test;
import io.quarkus.test.TestTransaction;
import io.quarkus.test.junit.QuarkusTest;
import jakarta.inject.Inject;
@QuarkusTest
public class ArtistRepositoryTest {
@Inject
ArtistRepository repository;
@Test
@TestTransaction
public void shouldCreateAndFindAnArtist() throws SQLException {
Artist artist = new Artist("name", "bio");
repository.persist(artist);
assertNotNull(artist.getId());
artist = repository.findById(artist.getId());
assertEquals("name", artist.getName());
}
}
ArtistRepository.java
package org.agoncal.qurkus.panache.repository;
import io.quarkus.hibernate.orm.panache.PanacheRepositoryBase;
import jakarta.enterprise.context.ApplicationScoped;
import org.agoncal.quarkus.jdbc.Artist;
@ApplicationScoped
public class ArtistRepository implements PanacheRepositoryBase<Artist, Long> {
// Your repository methods here, which can use SQL queries directly.
}
Hello, I'm following an online tutorial, but came across an error which I am not able to resolve.
[ERROR] Errors:
[ERROR] ArtistRepositoryTest.shouldCreateAndFindAnArtist:27 » IllegalArgument Not an entity [class org.agoncal.quarkus.jdbc.Artist]
Making the same steps as shown in course. Even copyed the file sources from the repo to try to fix the issue.
ArtistRepositoryTest.java
ArtistRepository.java
orm.xml
The text was updated successfully, but these errors were encountered: