[ROO-3587] Entity implementing interface with getId(): double generation Created: 15/Jan/15  Updated: 22/Feb/16  Resolved: 24/Jun/15

Status: Resolved
Project: Spring Roo
Component/s: GENERAL OBJECTS
Affects Version/s: 1.3.1.RC2, 1.3.1.RELEASE
Fix Version/s: 2.0.0.M2

Type: Bug Priority: Critical
Reporter: Markus Strenn Assignee: Juan Carlos García del Canto
Resolution: Complete Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Java 7



 Description   

it's me again, annother bug joining ROO-3585 and ROO-3584...

interface:

public interface DemoInterface {
	
	public Long getId();
}

Entity Bean:

@RooJavaBean
@RooJpaActiveRecord
public class DemoEntity implements DemoInterface {

    private String name;
    
}

results in getId() generated in DemoEntity_Roo_Jpa_Entity.aj AND in DemoEntity_Roo_JavaBean.aj, too. (of course resulting in an compile error.



 Comments   
Comment by Frank Spies [ 09/Mar/15 ]

the getId()-method in DemoEntity_Roo_Java.aj always returns null:

 public Long DemoEntity.getId() {
        return null;
    }
Comment by Frank Spies [ 09/Mar/15 ]

FWIW, I think this should be a blocker - anyone who has anntated their classes with both @RooJavaBean
and @RooJpaActiveRecord won't be able to use them.

Comment by Markus Strenn [ 16/Jun/15 ]

@jcagarcia you wanted to take care of this issue in a fix-version 1.3.2... any plans to fix this error - it's very critical - in our project a blocker!

Comment by Juan Carlos García del Canto [ 24/Jun/15 ]

Hi Markus,

This issue was fixed and will be available on Spring Roo 2.0.0.M2 version.

I've tested that changes made in on ROO-3584 and ROO-3585 are still working!

Here's is the commit with the applied changes:

https://github.com/spring-projects/spring-roo/commit/98ba9d32c118e40f4f08c0b74e0a61ce3bc7f0ee

And here's the build process that tests that is working correctly:

https://build.spring.io/browse/ROO-BUILD-219

If you have some other question or bug report.. let me know!!

Best regards and thanks for your contributions!!

Comment by Markus Strenn [ 14/Dec/15 ]

hi juan,

I can confirm that this issue is fixed on 1.3.2.RELEASE

best regards!

Comment by Juan Carlos García del Canto [ 15/Dec/15 ]

Thank you Markus for your reported issues.

Regards,

Generated at Sat Jul 20 03:35:56 UTC 2019 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.